Tuesday, January 12, 2016

URL Rewriting

Sometimes cookies are disabled in client side. Therefore it session id will not be used in http request. In that case, session id will has to be passed to client by adding session id at the end of each URL. This is called URL rewriting.
URL rewriting works only on dynamically generated URL, not on the static web page.
response.encodeURL("/Test.do");
If you want to redirect the request to different URL but keeping the same session, use the following encoding.
response.encodeRedirectURL("/Test.do");

No comments:

Post a Comment