Obtaining the HttpSession outside of the servlet


Web tier: servlets, JSP, Web frameworks: Obtaining the HttpSession outside of the servlet

  1. I am using a 3rdparty vendor's servlet to service client's requests to our app through. The api provided to me by the vendor does not give access to the HttpSession associated to the request. Is there any mechanism to obtain the HttpSession other than requesting it from the HttpServletRequest object?
  2. Filters and Listeners[ Go to top ]

    You can use filters and/or listeners to access request, response, and session data outside the servlet. Filters are similar to servlets, and listeners are servlet oriented event listeners. Both are setup in the web.xml file.
  3. See this component from JSOS for example: http://www.servletsuite.com/servlets/sessadm.htm