|
URL Encoding is a process of transforming user input to a CGI form so it is fit for travel across the network -- basically, stripping spaces and punctuation and replacing with escape characters. URL Decoding is the reverse process. To perform these operations, call java.net.URLEncoder.encode() and java.net.URLDecoder.decode() (the latter was (finally!) added to JDK 1.2, aka Java 2). Example: changing "We're #1!" into "We%27re+%231%21" URL Rewriting is a technique for saving state information on the user's browser between page hits. It's sort of like cookies, only the information gets stored inside the URL, as an additional parameter. The HttpSession API, which is part of the Servlet API, sometimes uses URL Rewriting when cookies are unavailable. Example: changing <A HREF="nextpage.html"> into <A HREF="nextpage.html;$sessionid$=DSJFSDKFSLDFEEKOE"> (or whatever the actual syntax is; I forget offhand) (Unfortunately, the method in the Servlet API for doing URL rewriting for session ...
more
|
What is the difference between URL encoding, URL rewriting, HTML escaping, and entity encoding?
Related Questions
- Lots of things. Some people use IIRF to allow his community site to expose Search-Engine-Friendly URLs. One ...
- Yes. Cookieless session handling and state management is possible by parsing data from an HTTP response and ...
- I saw thatHttpSessionContextclass was deprecated for security reason, but for security reasons too i would ...
- That's a big topic, so I'll direct you elsewhere for the answer. Wikipedia has a good entry on the subject. ...
- A scenario that URL Rewriting solves nicely is that of multiple subdomains being routed to a single machine. ...