problem solved.  but in case anyone needs to know, here is what happened.

i'm using jrun 2.3.3 on nt with iis.  in the servlet i was setting the
maxinactiveinterval to 600, thinking that would reduce the timeout from 30
min to 10.  after speaking with an allaire engineer, however, i discovered
that jrun implements this method in milliseconds, not seconds (the api
specifies seconds).  so my session was expiring 600 milliseconds after i
reached the page.

anyone else using jrun, beware of this little problem..


>From: Brian Schaefer <[EMAIL PROTECTED]>
>To: 'Bradley McLain' <[EMAIL PROTECTED]>
>Subject: RE: problem with sessions and jsp
>Date: Tue, 29 Feb 2000 19:48:55 -0800
>
>what server are you using?
>
>Brian M Schaefer  Ph.D.
>Senior Software Engineer
>Onvia.com
>Work. Wisely.
>http://www.onvia.com
>tel: 206.352.3376
>fax: 206.352.3376
>
>
> > -----Original Message-----
> > From: Bradley McLain [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, February 27, 2000 12:42 PM
> > To: [EMAIL PROTECTED]
> > Subject: problem with sessions and jsp
> >
> >
> > i am creating a web app that uses a servlet to login and then
> > passes the
> > user along to an initial jsp and several sub-jsps below that.  once i
> > authenticate the user in the servlet i store their info
> > (userid, logintime)
> > in the session object because i want to display that on all
> > the subsequent
> > jsps.
> >
> > After placing the info in the session object and redirecting
> > to the first
> > jsp i am able to extract and display that information 100% of
> > the time.
> >
> > my problem is this:  any calls to subsequent jsps may or may
> > not be able to
> > extract the info.  about 30% of the time when i try to
> > display the info my
> > variables are null.  in other words, the information is no
> > longer there.
> > here is the code i'm using on each page.  it comes before the
> > </head> tag:
> >
> > String foo
> > ...
> > foo = (String) session.getValue("userName");  //get the value
> > ...
> > session.putValue("userName", foo);  //place back in the
> > session for next
> > page
> > ...
> >
> > as i said before, this works about 60-70% of the time, and
> > the subsquent
> > page will successfully extract 'userName' and assign it to
> > 'foo'.  but other
> > times the value isn't there and foo is null, throwing a
> > nullpointerexception
> > when i try to put it back into the session.
> >
> > am i doing something completely wrong here? am i leaving
> > something out?  any
> > help would be very welcome.
> >
> > bradley
> >
> >
> > ______________________________________________________
> > Get Your Private, Free Email at http://www.hotmail.com
> >
> > ==============================================================
> > =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body:
> > "signoff JSP-INTEREST".
> > FAQs on JSP can be found at:
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

===========================================================================
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

Reply via email to