This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I understand the process of URL encoding quite clearly but need clarification on the following. For a HTTP GET request the jsessionid parameter is appended to the URL. What do you do for a HTTP POST request? Is it possible to use URL rewriting with POST requests? Do you a) encode the ACTION attribute on the FORM tag OR b) include a hidden field on the form called jsessionid and give it the value of request.getsession(false).getId()? I can't find any detailed information in any of my texts and the servlet 2.3 specification doesn't clarify this. Can anyone clarify this for me? Rob SJCP2 SCWCD
Absolutely don't put a hidden form field called jsessionid.
Your container *may* implement the POST URL re-writing in this way (iPlanet comes to mind, even though they call their gxsessionid), and if you have one already in there, it will confuse the container.
Joined: Aug 12, 2001
Thanks for your input on this. I have tried a few examples out & have ascertained that encoding the ACTION form attribute is the way to go. The hidden field method failed completely. Rob