posted 13 years ago
Hi,
I am working in struts1.1. I have 2 jsps (main.jsp and main1.jsp) and only one form (form1.java). only one action(MainAction.java).
I have created only one form and action because validation and business logic are almost same.
so in struts-config.xml
<action name="form1" input="main.jsp" path="/mainAction" type="com.action.MainAction" scope="session" parameter="operation">
<forward name="newTransaction" path="main.jsp" redirect="no"/>
<forward name="updatedTransaction" path="main1.jsp" redirect="no"/>
</action>
Now, when i am in main1.jsp and i submit page then if validate() method from form1 raise error then it opens main.jsp not main1.jsp.
I want to open main.jsp.
and this problem is coming because of input="main.jsp" I have written in action tag.
Please can you advice, what can i do?
thanks in advance