You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Richard Sand <rs...@vgalleries.com> on 2001/06/25 12:32:37 UTC
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: tomcat-user@jakarta.apache.org
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