This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
i wrote a jsp file which has a form and some input elements, after a form submitting to servlet, the servlet forward back to the jsp but the input elements does
not keep their values has it were before submitting. my question is how to keep the values of the input elements like they were before the submitting?
If your servlet just returns to jsp file simply, you can use <%= request.getParameter("name") %> or one different option is save variables' values into session object and get them from session object in jsp page.
moshik salem
Greenhorn
Joined: Dec 06, 2011
Posts: 10
posted
0
i am trying to post a form to the servlet using javascript, the servlet is forwards back to the same jsp. but because the javascript the form is submitted again
and the same servlet is forwards back again, and this process occur over and over again.
i tried to stop this behavior with hidden field that acts like a flag but his value is lost after the servlet forwards back.
Sounds a lot like your other post where things aren't working as they should be. Your script must be dining something rather hanky, but you haven't posted it in wither topic.
I'm going to close this topic so we can concentrate on the other one where you should post your script (be sure to UseCodeTags).