Hi, In the following how the session can be tracked using URL Rewriting method. I heard that URL Rewriting method is used when the cookies are disabled. But i don't know how to implement it for the following examples. Is it URL Rewriting will be considered by the server automatically when the cookies are disabled or what? Thanks & Regards, M.S.Raman.
[ August 22, 2003: Message edited by: Carl Trusiak ]
You might want to check out what the encodeURL method of HttpServletResponse does, here is what the API says:
encodeURL public java.lang.String encodeURL(java.lang.String url)Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary. For robust session tracking, all URLs emitted by a servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies. Parameters: url - the url to be encoded. Returns: the encoded URL if encoding is needed; the unchanged URL otherwise.
The secret to creativity is knowing how to hide your sources.