Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cookies

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 250 HFSJ BOOk.

I created 2 servlets and 1 jsp page in a web application
I had put the html and jsp page in the root of the web application.

In the 1st servlet I set a cookie and forwarded the request to the jsp page. In the jsp page I have a link to the 2 servlet.

I open a fresh brower and type the entire URL for the jsp page which has a link to the 2nd servlet. When I click the link I am getting JSESSIONID as the cookie with a value. I couldn't understand how I am getting this. Because I am not getting a session the from request object (or) adding a cookie in the response. Then how the browser is sending the JSESSIONID cookie back with the request.

I appreciate your help
[ August 25, 2005: Message edited by: vishnu prakash ]
 
Amit Saini
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think session is enabled by default on your jsp page.
Try <%@ page session="false" %> on your jsp.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was really confused about how things are happening. Your answer made it clear. Thanks Amit.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic