Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with URL rewriting?

 
Dominic Steng�rd
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ServletGurus!

Im trying to get my links URL encoded using:



And from what I have understood, the Tomcat server doesnt know if the client will support cookies on the first response back to the client, so it should start by attempting to set the session id in a cookie AND at the end of URLs that have been encoded using the reponse.encodeURL() method on the first response.

This doesnt seem to be happening. When I access my servlet for the first time it doesnt add the session id at the end of the "click me" link.
Why?

Thanks in advance.

Kind regards
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) URLEncoding may need to be activated on the server. I know in WebSphere it is a server setting. The same may be true for Tomcat

2) Some servers "know" that cookies are active and will not append the jSessionID to the URL (don't ask me how they know). Turn off cookie and ss if the URL is appended
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic