| Author |
Submitting forms with URL re-writing
|
Hazel Sisson
Greenhorn
Joined: Feb 12, 2002
Posts: 17
|
|
Hello! I am currently building a web application using JSP and servlets, and have successfully implemented session tracking using the HttpSession. I am also using encodeUrl() on each link in case the user has disabled cookies. It works fine until there is a form and the user hits submit, then the session is lost and they are taken back to the login page. The submit button just uses this javascript ocument.bookDetails.submit() to submit the data, then the form calls a servlet which processes the form data, updates the DB and then calls a new page using requestDispatcher. Obviously this needs to be changed, but I have no idea what it should be changed to! Is it the servlet that needs to be changed? What do I need to do to maintain the URL re-writing? Thanks very much, Hazel
|
 |
Dave Vick
Ranch Hand
Joined: May 10, 2001
Posts: 3244
|
|
Hazel It is the 'action' attribute of the form tag that needs to be encoded.
|
Dave
|
 |
Hazel Sisson
Greenhorn
Joined: Feb 12, 2002
Posts: 17
|
|
Thanks Dave.
|
 |
 |
|
|
subject: Submitting forms with URL re-writing
|
|
|