First, if you want people on the list to respond, you should post in
plain text (a significant number use text-only email readers, which makes
the message you sent very hard to read).

        Second, if you want you object to be found from the PageContext
object, then you need to put it there by using a scope="page".  If other
application servers do this, then they are wrong - this behavior is
specified very clearly in the spec.

        Randy

-----Original Message-----
From: Richard Sand [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 6:33 AM
To: [EMAIL PROTECTED]
Subject: Tomcat not putting session objects into JSP page context?
(repost...)


Hi all- I'm sorry for the repost but this is still stumping me.  I'm using
Tomcat 3.2.2 natively (over port 8080).  
----- Original Message ----- 
From: Richard Sand 
To: [EMAIL PROTECTED] 
Sent: Friday, June 22, 2001 3:19 PM
Subject: Tomcat not putting session objects into JSP page context?


Hi all- I've got a JSP/Javabean application that works fine under JRun and
iPlanet Web Server.  However, when I use Tomcat, it does not seem to be
instantiating new session variables if they don't already exist.  In the top
of my JSP page, I have:

<jsp:useBean id="loginBean" class="LoginBean" scope="session"/>

And further down in the page I do (actually inside a TagLib, but I tried it
in the page as well as a test):

  Object obj = pageContext.getAttribute("loginBean");

But obj comes back as null.  If I try:
 
 LoginBean tlb = (LoginBean) session.getAttribute("loginBean");

then I get the bean!  Why is my call to pageContext failing to get
loginBean, especially considering that this works on other Java application
servers?

Thanks for any help!

Best regards,

Richard

Reply via email to