• 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

rewritten URLs

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.myserver.com/myservlet/index.html?jsessionid=1234 --> url rewritten true.
or http://www.myserver.com/myservlet/index.html;jsessionid=1234--> url rewritten true
or both true?
Ping Lu
SCJP 1.4 with 96%
 
Ranch Hand
Posts: 504
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This looks like two different ideas struggling to get out.
The first url is closer to URL rewriting, but instead of session id, you should supply parameters for request:
http://myserver/index.jsp?fname=john&lname=smith
Your second example looks like an encoded URL where the session id is supplied by response.encodeURL(String URL) method. It's widely used to maintain session tracking if the browser's cookies are disabled.
 
author
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
If you are using the term "URL rewriting" from the servlet specification, then the second URL is properly formatted for URL rewriting as it applies to session management using a J2EE Web container.
The first URL simply sends the jsessionid as a form parameter. This strategy will not work for session management as defined by the servlet spec.
The servlet spec states that URL rewriting (for session mgt) must be done as part of the URL "extra info" (which is often delimited from the URL itself by a semi-colon ';') and not part of a GET request form parameter list (which is always delimited by a question mark '?').
Now, I will grant that the term "URL rewriting" might have other interpretations (a part from session mgt), which --I suspect-- is what Vad has pointed out.
HTH,
Bryan
 
I like tacos! And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic