You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Henry <he...@cafelab.com> on 2003/01/23 17:38:53 UTC

HttpSessionbindingListener

Hi FRIENDS:

while I use JSP building my AP , where can I implement this interface? should I implement it just in the page/servlet which
I create session? or I have to implement it all my pages?

Re: HttpSessionbindingListener

Posted by Garrett Smith <ja...@yahoo.com>.
Sessions are created automatically by the container, which handles all the
implementation details. An HttpSession is an interface; the container
determines the session's true runtime type. 

Test it on your container:
<%= session.getClass() %>

valueBound/Unbound call back to the object that implements this interface,
telling it that it was added/removed to the session.

http://www.acknowledge.co.uk/java/tutorial/servlet_tutorial/servlets/working_sessions.html

--- Henry <he...@cafelab.com> wrote:
> Hi FRIENDS:
> 
> while I use JSP building my AP , where can I implement this interface? should
> I implement it just in the page/servlet which
> I create session? or I have to implement it all my pages?


=====
http://dhtmlkitchen.com/
JSP | Servlets | DHTML 

Garrett Needs A Job

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: HttpSessionbindingListener

Posted by Henry <he...@cafelab.com>.
thanks Daniel,
I got your point and I'll try to work with that!

----- Original Message -----
From: "Daniel Brown" <gm...@blueyonder.co.uk>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, January 24, 2003 11:14 PM
Subject: RE: HttpSessionbindingListener


> Henry,
>
> HttpSessionBindingListener enables you to be notified when an object is
> bound into a session, or when the object is removed from the session
(either
> progammatically, or when the session itself is invalidated or expired).
>
> If you'd like an object stored in the session to be notified in this way,
it
> must implement the HttpSessionBindingListener interface.
>
> The interface doesn't have any direct relevance to servlets and JSPs,
unless
> you have some specific session management requirements. You certainly
don't
> need it to use sessions in the normal way - just use the 'session' object
in
> JSP, and HttpServletRequest.getSession() in servlets.
>
> HTH,
>
> Dan.
>
>
> > -----Original Message-----
> > From: Henry [mailto:henry@cafelab.com]
> > Sent: 23 January 2003 16:39
> > To: Tomcat Users List
> > Subject: HttpSessionbindingListener
> >
> >
> > Hi FRIENDS:
> >
> > while I use JSP building my AP , where can I implement this
> > interface? should I implement it just in the page/servlet which
> > I create session? or I have to implement it all my pages?
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: HttpSessionbindingListener

Posted by Daniel Brown <gm...@blueyonder.co.uk>.
Henry,

HttpSessionBindingListener enables you to be notified when an object is
bound into a session, or when the object is removed from the session (either
progammatically, or when the session itself is invalidated or expired).

If you'd like an object stored in the session to be notified in this way, it
must implement the HttpSessionBindingListener interface.

The interface doesn't have any direct relevance to servlets and JSPs, unless
you have some specific session management requirements. You certainly don't
need it to use sessions in the normal way - just use the 'session' object in
JSP, and HttpServletRequest.getSession() in servlets.

HTH,

Dan.


> -----Original Message-----
> From: Henry [mailto:henry@cafelab.com]
> Sent: 23 January 2003 16:39
> To: Tomcat Users List
> Subject: HttpSessionbindingListener
>
>
> Hi FRIENDS:
>
> while I use JSP building my AP , where can I implement this
> interface? should I implement it just in the page/servlet which
> I create session? or I have to implement it all my pages?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>