Skip navigation links


javax.servlet.sip
Interface ConvergedHttpSession


public interface ConvergedHttpSession

The ConvergedHttpSession class provides access to HttpSession related functionality which is only present in a converged HTTP/SIP container. In a converged container, an instance of HttpSession can be cast to ConvergedHttpSession in order to access methods available available only to converged applications.

Since:
1.1

Method Summary
 java.lang.String encodeURL(java.lang.String url)
          This method encodes the HTTP URL with the jsessionid.
 java.lang.String encodeURL(java.lang.String relativePath, java.lang.String scheme)
          Converts the given relative path to an absolute URL by prepending the contextPath for the current ServletContext, the given scheme ("http" or "https"), and the host:port, and then encoding the resulting URL with the jsessionid.
 SipApplicationSession getApplicationSession()
          Returns the parent SipApplicationSession if it exists, if none exists then a new one is created and returned after associating it with the converged http session.

 

Method Detail

getApplicationSession

SipApplicationSession getApplicationSession()
Returns the parent SipApplicationSession if it exists, if none exists then a new one is created and returned after associating it with the converged http session.
Returns:
the parent SipApplicationSession

encodeURL

java.lang.String encodeURL(java.lang.String url)
This method encodes the HTTP URL with the jsessionid. ";jsessionid=http-session-id". The URL parameter should be an absolute URL. For example, http://server:7001/mywebapp/foo.jsp. Where "/mywebapp" is the context path of the the current ServletContext, because that is where the httpSession belongs to.
Parameters:
url - the HTTP URL String to be encoded
Returns:
encoded URL with jsessionid

encodeURL

java.lang.String encodeURL(java.lang.String relativePath,
                           java.lang.String scheme)
Converts the given relative path to an absolute URL by prepending the contextPath for the current ServletContext, the given scheme ("http" or "https"), and the host:port, and then encoding the resulting URL with the jsessionid.

For example, this method converts:

   from: "/foo.jsp"
   to: "http://server:8888/mywebapp/foo.jsp;jsessionid=http-session-id"
 
Where, "/mywebapp" is the contextPath for the current ServletContext server is the front end host defined for the web server.
Parameters:
relativePath - relative to the current webapp
scheme - the scheme ("http" or "https")
Returns:
encoded URL with jsessionid

Skip navigation links

Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Java SIP Servlet API 1.1 Reference

Part Number E17883-01