JSP to Servlet hidden text passing
Posted on 2003-03-31
I currently have a web application that takes user input from a jsp page and processes that information within a servlet. I need to check user input, and if an error is detected forward back to the user input jsp. I also need to indicate the errors that they made. I thought that this would be relatively simple to do. I tried checking for errors in the servlet and then setting the text of a hidden input to indicate that an error has occured.
The problem that I'm having is that the hidden text box seems to be reset whenever a forward command is sent to it. Whenever the jsp checks for the hidden text it finds an empty string. I have logging setup, and while in the servlet I can tell that the hidden text was correctly set. However as soon as its forwarded the hidden text is reset.
How can I check for errors in the servlet and pass a value to the jsp to indicate that some input was not correctly entered?
Thanks in advance,