tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Vilardi" <>
Subject Session attributes disappear between .jsp pages
Date Thu, 21 Apr 2005 22:03:55 GMT
Hi. I've got an odd problem that I'm hoping that someone can help to diagnose.

 A new application that we're building is losing attributes of a session 
between SOME of its pages. This behavior occurs about 85% of the time. 
Sometimes all of our session will transmit and most times about half of the 
objects get through. The objects that always come through are strings and some 
numbers. The bits that occasionally get through are our database connector 
object, our menu bar class and a couple of other ints. The kicker is that the 
entire session is created by a java object called from a jsp (login) and it 
ALWAYS propagates to the next page correctly. The transition between the second 
and third page, whether it is a redrect or a link causes, the problem. We've 
reduced the page that this occurs on to something that just enumerates the 
session and has a link to itself. I'm including the page source at the end of 
the message.

We're running Tomcat 5.0.28 through Apache (Apache/2.0.52 (Unix) mod_ssl/2.0.52 
OpenSSL/0.9.6m mod_jk/1.2.6 Server at Port 443) on 
Debian unstable patched two days ago.

The other thing that has me chasing my tail is that we have a much more complex 
system using the same core library with massive sessions and similar objects 
that work fine on the same system. For those of you who are still reading, 
(thank you!) the sequence of events is that we start by keying the URI for 
login.jsp into the browser. We then login to the database, and a session is 
created and populated. When we finish logging in, the system sends a redirect 
that brings us to bbs.jsp (below).  When we arrive the session has all 
attributes we expect. Clicking on the middle link at the bottom of the page 
causes the problem.

Any insight that you may be able to offer would _really_ be appreciated. My 
brain is currently trying to claw its way out of my skull to escape impending 


----------------- begin bbs.jsp
<%@ page buffer="50kb"
oft.hbiz.*,com.recurrentsoft.hutil.*,java.util.*,*" %>
Enumeration en = session.getAttributeNames();
while (en.hasMoreElements()) {
    String sName = (String)en.nextElement();
    <%=sName%> = <%=session.getAttribute(sName)%><br>
<a href="bbsmaint.jsp">bbsmaint.jsp</a>
<a href="bbs.jsp">bbs.jsp</a>
<a href="tempsysadm.jsp">tempsysadm.jsp</a>
------------------- end bbs.jsp-- 
Gregory H. Vilardi    631-752-2701x240
Project Manager / Lead Software Engineer           Fax: (631)752-3397
Recurrent Software Solutions, Inc.
1 Huntington Quadrangle, Suite 1C02, Melville, NY 11747 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message