BBjspWebRequest::getRequestedSessionId (Deprecated)

Description

In BBj 16.0 and higher, this method returns the session ID specified by the client.

Syntax

Return Value

Method

String

getRequestedSessionId()

Parameters

None.

Return Value

a String containing the requested session id

Remarks

The example below shows getting the requested session ID from a request within a BBJSP Servlet.

Example

This example demonstrates how this works in a BBJSP web-page


    
        

Hello from BBJSP

Requested Session ID:<%= #getRequest().getRequestedSessionId() %>

This example demonstrates how this works in a BBJSP servlet

class public MyServlet
    field private BBjspWebRequest request!
    field private BBjspWebResponse response!
    field private BBjspWebSession session!

    method public void service(BBjspServletContext context!)

        #request! = context!.getRequest()
        #response! = context!.getResponse()
        #response!.setContentType("text/html")
        s! = #response!.getOutputStream()

        s!.write("<html><body><h1>Hello from BBJSP</h1>")
        s!.write("Requested Session ID:" + #request!.getRequestedSessionId())
        s!.write("</body></html>")
    methodend
classend

See Also

BBJSP

BBjspWebRequest