This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I don't know if this problem has been discussed before or not, but there is my problem: I have two actions, action1 and action2, with corresponding forms (form1 and form2) and jsp files (jsp1 and jsp2). Both jsp1 and jsp2 contains a submit button, so I defined the same property "submitButton" in both form1 and form2 for the button.
The process flow should be that user clicks submit on jsp1, action1 will do some work, and then forward to action2, and action2 will do some initialization work and display jsp2. The struts-config.xml would look like:
The problem is that since I give the same property submitButton for both form1 and form2, so when action1 forward to action2, action2 always find the property submitButton of form2 to be not null! Therefore, action2 forwards again to action3 just like user also clicks the submit button on jsp2!
I know the problem will disappear if I give different names for the submit button in form1 and form2, but this is really not a good workaround.