开发者

re-fill form values in jsp [duplicate]

This question already has answers here: How can I retain HTML form field values in JSP after submitting form to Servlet? (2 answers) Closed 7 years ago.

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜