• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with URL rewriting?

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic