Web tier: servlets, JSP, Web frameworks: Obtaining the HttpSession outside of the servlet
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?
- Posted by: Fazle Khan
- Posted on: May 21 2008 18:18 EDT
- Filters and Listeners by Da Bu on May 22 2008 01:33 EDT
- Re: Obtaining the HttpSession outside of the servlet by Dmitry Namiot on May 22 2008 14:23 EDT
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.
See this component from JSOS for example: http://www.servletsuite.com/servlets/sessadm.htm