Angela Chow wrote:
>
> thanks for your reply :)
>
> i am very new to this concept. Is there anywhere that
> i can learn a little bit more about this? I've notice
> that Tomy Wong has put some code on his reply:
>
> HttpSession session = HttpServletRequest.getsession();
> session.putValue("listenerobjcet",listener);
> HttpSessionBindingEvent sessionbind = new
> HttpSessionBindingEvent(session,"listener");
> session.removeValue("listener");
>
> I don't know where to put this code, is the jsp page,
> or in the bean? If in the jsp page, is it on every
> page? How do i set the length of time for the
> time-out? I am getting little confused. Please help
> me out!
I'd suggest that any Java code puts either in Tag Extensions or
servlets. Going even a little further, try to follow Model 2 ideas.
Create *one* servlet controller which controls who should do what. In
that case, all JSPs do is only to display beans' state.
To answer your question(s), just put it inside servlet controller, so
the following JSP pages can use it. After that, just forward request to
JSP to display it. When you becomes more familiar with that approach,
you won't have to search all your code, just to check out whether
everything is right. All you'll have to do is to open *one* servlet
controller and modify it as you wish.
Simple ? Yes, it should be:)
>
> angela
Jacek Laskowski
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets