re-fill form values in jsp [duplicate]
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 t开发者_开发技巧hat 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?
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}"/>
have you considered using spring binding?
精彩评论