• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

URL ReWriting

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone make me clear on URLRewriting concept and why can they be used for static pages

Thanks in Advance !!!
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You use URL rewriting when the client has disabled cookies on the browser. URL rewriting takes the session ID that is in the cookie and stick it right onto the end of every URL that comes in to the application. The Container will strip of this extra part of the request URL and use it to find the matching session when a user request something from a link. All of this is necessary because HTTP is stateless so you cannot keep track of a users session unless you use cookies or URL rewriting.

Why it cannot be used in static pages (html) is for the same reason you can not use scripting and EL in static pages. HTML is not turned into some sort of JAVA class that will be executed. With a JSP the scripting or EL code is turned into JAVA code when the JSP is transformed into a servlet class that will be executed and the response send to the browser. You need a response.endcodeURL or <c:URL> to encode the URL for you and it will only work in a dynamic page.
 
Venkat Perumalla
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Dirk
 
Hang a left on main. Then read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic