• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session problem

 
Deepak Tewari
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing some unusual problem,
Problem is, I have one JSP page and one servlet,
JSP page opens as a model window.
I have one loged in user, when the user clicks on the
href link on the jsp which is model window to go to the
servlet, but the user gets logeout of the site, means session is
not getting maintained in the path.
Abnormality with this problem is,It is specific to the browsers,
for some browsers session is getting maintained and not for others.

Solution I tried:-
append jsession id with the URL,
used encodeURL also, but problem persists.

Point to note:-
As for the cases it is working fine, the session id
I append with the url is the same what I get on servlet
while debugging,
But it differs with the cases when we have problem.


Thanks in advance if any one can help me.
 
Debajyoti Sinha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell us in which browser session is maintained in which browser not ?

I know in IE , the session is maintained by using cookies by default, unless they are disabled by the client browser.

You had mentioned that you also used URL rewriting..but it is sometimes browser dependent.

By default the Web Container sends or receive session ID using cookie.

You may want to do something like this to see if your cookies are set in the request header.See the atached code. Include the following code in your program and see if the cookie is set.

------------------------------------------
....
....
pw.println("SessionID =" + mysession.getId() + "<br>");
pw.println("<h3>Following are the headers that server received.</h3><p>");
Enumeration headers = req.getHeaderNames();
while (headers.hasMoreElements() )
{
String header = (String) headers.nextElement();
String value = req.getHeader(header);
pw.println(header + " value= " + value + "<br>");
}
...
------------------------------------------
hope this helps...
 
Deepak Tewari
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This problem is comming with the IE itself, exactly I too not able to figure out the problem, I have checked the session id for one version it same on jsp and servlet and for the other where the session is not maintined it differs.
This problem is with different versions of ie.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you verify that session cookies (MSIE treats them differently than other cookies) are enabled?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic