Yes, good point, gives you an idea how long some of this stuff has been deployed :-)

However, even changing to setAttribute() and getAttribute() does not seem to solve the problem. This should be trivial I would think but it seems to be beyond me at the moment.

Is there maybe some (small) limit to the size of session attributes in Tomcat 5? In this case ml is a populated properties file. Though in this case it contains only about 5 or 6 entries.

in starting jsp 1
 session.setAttribute("ml",ml);

in target jsp 2
MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml");
System.out.println("ml = "+ml);


then in the log I see...

  ml = null


Mike

Ben Souther wrote:

putValue and getValue have been deprecated.
See: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html

Use setAttribute and getAttribute instead.



On Thursday 20 May 2004 08:41 am, M.Hockings wrote:


My ISP has just upgraded the servlet container from Tomcat 4.1 (which
was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe).  I have had
several webapps successfully deployed under Tomcat 4.1 that were causing
Tomcat 5 not to start.  For the most part I think I have fixed all of
these problems (largely a miss-configuration of log4j) but still one
major problem remains.

The remaining problem is that session data does not seem to be preserved
from page to page.  That is, if on a simple .jsp I have something like:

  myPackage.myClass ml = new myPackage.myClass();
  session.putValue("ml",ml);

Then do a form-based submit to a second jsp which contains:

  <jsp:useBean id="ml" scope="session" type="myPackage.myClass" />

Then I get an error saying

  javax.servlet.ServletException: bean ml not found within scope

If I try to manually extract the ml attribute from the session in the
second .jsp I find that it is not set.

I have done some Googling about this problem but I don't see anything
that would help -- the hits were largely about clustering.  In my case I
do not have access to the Tomcat config (server.xml) and have to live
with how things are configured at the ISP.

Has anyone else experienced this problem?  If so, is there a solution?

To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K)
where it exhibits the same problem and on a Linux (Fedora Core 1)
machine where it does not exhibit this problem. Both are running on
Sun's 1.4 JDK with the stock (as shipped) server.xml.

The ISP which has been very responsive in the past is being not all that
helpful and they had the active component of the sites down for the best
part of a week!

Mike



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to