Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TOMCAT 5 session

Status
Not open for further replies.

julk

Programmer
Jun 23, 2004
10
US
hi there
we just upgraded to tomcat 5 and got it working with Apache. that work fine.
but for some reason the session are being droped between pages here is a simple example of the code i have.

in the firts page i have this


<jsp:useBean id="USER" class="myBeans.SessionBean" scope="session"/>
<jsp:setProperty name="USER" property="path" value='Sucaritas' />

<html>
<head><title>View page</title></head>
<body>
<%
out.print("USER.getPath()="+USER.getPath());
out.print("<A HREF='session2.jsp'>next page</A>");
%>
Session id: <%= session.getId() %>
</body>
</html>

and when i click to go ro the next page that session is droped, i know this because the properties is set to null (new instance is created), and the session id is diferent.

can any one giveme any imput on this?
the code for the second page is this

<jsp:useBean id="USER" class="myBeans.SessionBean" scope="session"/>
<html>
<head><title>View page</title></head>
<body>
<%
out.print("USER.getPath()="+USER.getPath());
out.print("<A HREF='session2.jsp'>next page</A>");
%>
Session id: <%= session.getId() %>
</body>
</html>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top