"Haseltine, Celeste" wrote: > > Hans, > > Can you use a session life cycle event listerner with JSP 1.1? I don't > think you can, but I just wanted to check. We are not going to be able to > upgrade to JRUN Server 3.1 until after we deploy, and JRUN 3.01 is based on > the JSP 1.1 standard, if my memory is correct.
The session (and application) life cycle listener is a new feature in Servlet 2.3 and JSP 1.2; you can not use them with JSP 1.1. The closest you get in JSP 1.1 is to put a bean that implements the HttpSessionBindingEventListener interface in the session. Hans > -----Original Message----- > From: Hans Bergsten [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 22, 2001 3:15 PM > To: [EMAIL PROTECTED] > Subject: Re: Use of Session Attribute > > Eric Fleming wrote: > > > > I am a Cold Fusion Developer learning JSP and have a question. In Cold > > Fusion we have an application file and upon request of a cf page, the > > application file is called first. this is how we store a lot of variables > > associated with each page, is there a file that JSP pages go through first > > or is there a way to store variables in JSP? I have been using session to > > do this, but I have to check to see if the variable is defined on every > page > > and if it isn't, set it. Anybody know of an easier way to do this? Sorry > > if this message is confusing. > > In JSP 1.2 (Servlet 2.3), you can create a session life cycle event listener > to handle this. It gets called when a new session starts (and ends), so you > can initialize the session with all the data you need. > > <http://www.onjava.com/pub/a/onjava/2001/10/10/jsp.html> > > Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
