Forums Register Login
Maintaining Session using Rewriting URL
Hi All
With the cookies disabled we have no optin other than rely on URL rewriting. but the problem is if i am requesting for a resource from a html Form, how can i maintain the session.

Will i need to rewriting the action say encodeURL(/action/sample.do); and place it as the action attribute for the form tag.

Help me out.
Simple answer - yes, you'll need to encode the URL, because if you don't you'll lose track of the session.

I'm not sure in what form you're producing the html form - i.e. whether from a servlet or a jsp. If you're generating from a servlet, then yes encodeUrl would be appropriate. If on the other hand you're using a jsp, you could use the url tag from the core library which takes care of URL rewriting automatically:

then write out the url on the action with:

[ August 03, 2006: Message edited by: Daniel Dalton ]
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

All times above are in ranch (not your local) time.
The current ranch time is
Nov 20, 2017 23:54:58.