• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

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
 
Always look on the bright side of life. At least this ad is really tiny:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic