Re: deprecated servlet session management: getSessionContext();
From: Erwin Moller (since_humans_read_this_I_am_spammed_too_much_at_spamyourself.com)
Date: 10/07/03
- Next message: Laurent Leconte: "JSP: problem with import ("package does not exist")"
- Previous message: Marco Schmidt: "Re: After Sun goes out"
- In reply to: david: "Re: deprecated servlet session management: getSessionContext();"
- Next in thread: david: "Re: deprecated servlet session management: getSessionContext();"
- Reply: david: "Re: deprecated servlet session management: getSessionContext();"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 07 Oct 2003 11:11:17 +0200
> Thanks... can you point to any good articles/books/texts that discuss
> "replacement" techniques (i.e. deprecated API -> new API) for session
> management.
No, sorry, cannot be of any help there.
Sun didn't deprecate it to annoy you, I think they deprecated it because
there was no use after all. (I am not sure of this though....)
I have some advise:
I think you can figure it out yourself if you just get a little bit angry
and try it with ServletContext or HttpSessionBindingListener.
HttpSessionBindingListener:
What are you expecting from HttpSessionContext that cannot be replaced by
another custummade class that can hold ANY enumeration, or whatever suits
your needs?
ServletContext:
You have a look ServletContext (or APPLICATION from a JSP point-of-view) if
you need a place that is accecable from ALL SERVLETS AND JSP.
If you have no clue what I am talking about, just look in the API, and try a
little, like this:
Just try to store some class in ServletContext, and you will see you can
retrieve it by the name you stored it under from other servlets and
sessions too. (You have to cast it from Object to your classdefinition
first.)
I am quite sure you can retrieve any functionality of the deprecated
sessionContext with one of the above, or both, methods.
Hope this helps you.
Good luck,
Erwin Moller
PS: There still is a valid SessionContext but it concerns EJB, I guess that
is not what you are looking for. Just wanted to mention it. If you don't
use EJB, don't look into it, it will confuse you a lot.
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/ejb/SessionContext.html
- Next message: Laurent Leconte: "JSP: problem with import ("package does not exist")"
- Previous message: Marco Schmidt: "Re: After Sun goes out"
- In reply to: david: "Re: deprecated servlet session management: getSessionContext();"
- Next in thread: david: "Re: deprecated servlet session management: getSessionContext();"
- Reply: david: "Re: deprecated servlet session management: getSessionContext();"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]