is it possible to redirect my jsp page to the same jsp page,with some form values filled in? like if I have first.jsp that contains a form, then I would want to redirect it back to first.jsp with a few buttons enabled and the form values should be filled automatically this time. I know how to enable the buttons, it's just the refilling of form that's troubling me. Or even if I had to redirect to another jsp, say second.jsp,but how do I retain the form values?
Asked
Active
Viewed 1,855 times
2 Answers
2
Yes this is possible and easily doable with JSTL. Look at my answer here How to re-populate form fields on a jsp page after failed server validation
You can just do <input name="foo" type="text" value="${param.foo}"/>

Community
- 1
- 1

Amir Raminfar
- 33,777
- 7
- 93
- 123
-
– Amir Raminfar Jul 07 '11 at 22:29
-
`fn:escapeXml()` is IDE and JSPX friendlier. See also http://stackoverflow.com/questions/2658922/xss-prevention-in-java – BalusC Jul 07 '11 at 22:36