I have simple strutsJSP and am using struts validation framework for validating the user input... ON ce, we enter emplooyee name in the JSP, it will validate the user input for required, special chars, spaces, .. I am displaying the error messages as pop-ups.. Now my doubt is , after the validation is fine, i shold get the same page, with some data displayed in the same page.. how can I achieve this.. thanks Raman [ October 07, 2003: Message edited by: M K Raman ]
If the validation is successful you should then be finding out what the forward is in your <action/> elements in the struts-config.xml file. So you might have something like <action.... ..> <forward name="valid" path="/page.jsp" /> </action> In this example, page.jsp is the same page, so when you come back to this page, you should have some data, a bean, or some request/session/application objects that you can deal with that were not there before. So somewhere in your JSP page you would perform some logic to determine whether or not you are to display your data. This is, at least, how I would approach it being somewhat new to STRUTS myself. But if someone has a better approach I would be happy to hear it.
Joined: May 27, 2002
Thanks a lot. I got ur point and am able to implement the same... [ October 07, 2003: Message edited by: M K Raman ] [ October 07, 2003: Message edited by: M K Raman ]