I am not even sure if I should use redirect.
What I have is a form (html) that uses java to read the input when the submit button is pressed and that part works fine. What I want is to be able to enter another item in the same form and submit this new item the same way. I am using a Java servlet.
I am not even sure if I should use redirect. What I have is
Share
I think you have 2 options. The first one is to put a redirect script on the page that appears after the form is submitted to redirect the user to the previous page. It should be something like:
Another way is to use Ajax to submit your form instead. Try this jQuery plugin ajaxForm:
In the above example, I return the result as an xml file like this:
You can also return the result as a string.