This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Keeping Session Values  ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Keeping Session Values  !" Watch "Keeping Session Values  !" New topic
Author

Keeping Session Values !

Mayank Chaturvedi
Greenhorn

Joined: Oct 01, 2001
Posts: 4
In one JSP page , I have declared a session variable as -->
session.setAttribute("S_USERID",strUserId);
where strUserId is a STRING variable with some value .
If I get the Session variable in the same page using -->
String strUsr = (String)session.getAttribute("S_USERID")
the value is retrieved , but if I use the same Syntax in the next JSP Page where the control goes , the value retrieved is NULL .
I have also used the following tag in the next JSP Page -->
<%@ page session="true" %>
I have even checked the Session Ids in both the pages , they are the same.
Can u tell me why it is happening ?
I am using iPLanet Application Server . Do I need to set some parameters while deploying ?
Also suggest me a possible solution .
anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91
As far as I am concerned it should work.
are u giving this code at the begining of each page
<%@ page language="java" session="true" %>
I suppose try changing the server.
I am using resin server..quite good..infact tomcat had given me some problem..but this is a very user friendly server.
hope this helps
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Keeping Session Values !
 
It's not a secret anymore!