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
Author and all-around good cowpoke
Joined: Mar 22, 2000
As I recall, URLrewriting works the same for GET and POST. The servlet engine will grab parameters from both the URL and the POSTed data transparently to the programmer. Give it a try. Bill
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