Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL rewriting issue  RSS feed

 
jeramia vontez
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am having a url rewriting issue where the first time someone accesses the website with a browser that has cookies enabled my jsp pages will still encode all of the URL's with the jsessionid. Which I believe should not happen unless cookies are disabled.

Why is this occuring?

Once the user goes to another page in the site or the second time they bring up the site in the same browser the jsessionid is not written to the URL links. This only happens on first access.

I am using Tomcat 5.5
response.encodeURL() to encode the links

Is this a container or programming error?

Thank you all very much for your time in reading this!
 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is how it is supposed to work.

How initially will the container know, if your browser has the cookies enabled or disabled. So on the first request, it tries both, the cookies and the url rewriting. Then on next request, the container knows that the cookies work and hence urls and not rewriteen.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!