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