As i remember and as David said, you are suppose to use a real Action(servlet) in case of Struts 1 and do validation and respectively do return (mapping.findForward("failure")); or success depending on what you want. The point of the framework is MVC, so you would want to use the controller to dispatch around relative to validation or something else. There's a struts Login example here that shows the proper way to use the framework basicly: http://www.vaannila.com/struts/struts-example/struts-login-page-example-1.html
Joined: Oct 22, 2009
Thank you for the replies. I changed my code now. I have another doubt though.
I am using the jsp to take a value and am passing it to another jsp.
<%@ page import="java.util.*" %>
Now depending on the loop, some n values are being submitted in this form. I am catching all those in this code
Problem is the parameters thing is not getting all the values submitted in the previous form. Its just taking the first 2 values.
Joined: Nov 29, 2009
Proper way (although mixing jsp with scriptlet java is not recommended):