File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Access to servlet context in HttpSessionListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Access to servlet context in HttpSessionListener" Watch "Access to servlet context in HttpSessionListener" New topic
Author

Access to servlet context in HttpSessionListener

dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
I do not see any ways beside of using a singleton, or putting context value in session. I want to save some data from session before it will be destroyed. Is there a better way to do that? Maybe define HttpSessionBindingListener? Generally goal is to reuse HttpSessionListener for different applications storing something similar in sessions.


Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

HttpSessionListener -> HttpSessionEvent -> HttpSession -> ServletContext, or is not what you're looking for?
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access to servlet context in HttpSessionListener