I don't know how that is going to make a difference, But the current version of JSP , 
JSP 1.2 uses setAttribute and getAttribute instead of putValue and getValue

So, try using the following To set the information:
        session.setAttribute("StTime", time);
and to get the information on different page
String time = (String)earsSession.getAttribute("StTime").toString();

I am using this way and it is not giving me any trouble.  Maybe it depends on what 
type of JSP structure you have.

Thanks


-----Original Message-----
From: David Cate [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 1:23 PM
To: [EMAIL PROTECTED]
Subject: Problem with session variable


Normally I don't keep sensitive data inside of session variables but in this
case it was just simple. I needed a way of trapping the user name and some
statitistical information for the duration of the session. So I started
placing variables in the session object like this:

session.putValue("StTime",time);

time being a local String that contains the starting time for the request.
On the next page, I wanted to access the variable, so I perform:

String time = (String)session.getValue("StTime");

This works well in IE 5.5 but in IE6, the variable is ALWAYS null. I've
tried several different machine with several settings including allowing
allo cookies and setting the security to the lowest possible. I set up a
machine next to me and in IE5.5 the page displays fine and the variable is
set. in IE 6, no such luck.

Anyone have any advice or run into this before?

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

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

Reply via email to