Hello,
we have a strange problem using the enctype="multipart/form-data" in a html:form within a
JSP (in order to upload a file).
The jsp maske.jsp contains:
<html:form action="firstAction.do" enctype="multipart/form-data" method="POST">
After the post, the "firstAction" action is called. The reset() method of the "myFormBean" form bean is called and the bean is filled by calling its setter-methods.
Now the executeAction() method in class ExecuteAction.java will be entered, the form is filled and everything is ok.
The executeAction() will be left with the forward "mail", which leads into the "secondAction.do".
Without the JSP's enctype="multipart/form-data", the reset() method of the bean is called, afterwards the setters to refill the bean and then the executeAction() of class SecondAction.java is called. In this case everything is ok.
The problem: With use of the enctype="multipart/form-data" in the JSP, only the reset() method is called, but not the bean's setters. Consequently the formfields of the bean are not set.
We are thankful for all kinds of hints and advices.
The relevant part in the struts-config.xml is as follows:
<action path="/firstAction" input="inputmask.jsp" name="myFormBean" type="de.axa.axawebforms.actions.ExecuteAction" scope="session">
<forward name="mail" path="/secondAction.do"/>
</action>
<action path="/secondAction" name="myFormBean" type="de.axa.axawebforms.actions.SecondAction" scope="session">
<forward name="stay" path="/inputmask.jsp"/>
<forward name="success" path="/inputmask.jsp"/>
</action>
Thanks a lot!
Regards,
Sanjay Jena