P
philoso
I dont know if I'm doing this right... but I've been stuck with this
for couple days. The struts controller is trying to make an extra
actionForm with <html:form action="/page2"> (i.e. I'm trying get to
page1 with "action=/page2" html tag. When struts gets there, it also
trys to make page2 actionForm.) hope what I've said makes sense.
Here is my files.
struts-config.xml
<struts-config>
<form-beans>
<form-bean name="untitled1ActionForm"
type="struts_test.Untitled1ActionForm" />
</form-beans>
<action-mappings>
<action name="untitled1ActionForm"
type="struts_test.Untitled1Action" validate="true" scope="request"
path="/page1">
<forward name="success" path="/page1.jsp" />
</action>
<action name="untitled2ActionForm"
type="struts_test.Untitled2Action" validate="true" scope="request"
path="/page2">
<forward name="success" path="/page2.jsp" />
</action>
</action-mappings>
</struts-config>
page1.jsp
<body>
<html:form action="/page2" >
<p><html:text property="T1" size="20"/></p>
<p><html:text property="T2" size="20"/></p>
<p><html:submit property="submit"/></p>
</html:form>
</body>
=== SO.. when I type in http://localhost:8080/struts/page1.do, the
struts controller makes untitled1ActionForm and untitled2ActionForm.
On page1.jsp, when I get rid of <html:form action="page2">, it does
not make untitle2ActionForm.
for couple days. The struts controller is trying to make an extra
actionForm with <html:form action="/page2"> (i.e. I'm trying get to
page1 with "action=/page2" html tag. When struts gets there, it also
trys to make page2 actionForm.) hope what I've said makes sense.
Here is my files.
struts-config.xml
<struts-config>
<form-beans>
<form-bean name="untitled1ActionForm"
type="struts_test.Untitled1ActionForm" />
</form-beans>
<action-mappings>
<action name="untitled1ActionForm"
type="struts_test.Untitled1Action" validate="true" scope="request"
path="/page1">
<forward name="success" path="/page1.jsp" />
</action>
<action name="untitled2ActionForm"
type="struts_test.Untitled2Action" validate="true" scope="request"
path="/page2">
<forward name="success" path="/page2.jsp" />
</action>
</action-mappings>
</struts-config>
page1.jsp
<body>
<html:form action="/page2" >
<p><html:text property="T1" size="20"/></p>
<p><html:text property="T2" size="20"/></p>
<p><html:submit property="submit"/></p>
</html:form>
</body>
=== SO.. when I type in http://localhost:8080/struts/page1.do, the
struts controller makes untitled1ActionForm and untitled2ActionForm.
On page1.jsp, when I get rid of <html:form action="page2">, it does
not make untitle2ActionForm.