You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nilesh <ve...@hotmail.com> on 2004/02/11 08:15:19 UTC
Action Not working/getting called
I am a struts newbie, but have done a few forms in Struts.
In my current application, for a particular form when I click the Submit button the form gets submitted to itself, and all the textboxes I had filled before submitting get cleared. It doesnot go to VendorEntry.do
I am using DBCP to connect to mySQL
Can anybody please help me out. I have already invested a lot of time in it.
The "VendorEntryAction.java" & " VendorEntryForm.java" have been successfuly compiled n I am ready with these classes
following is a snap from vendorEntry.jsp -----> the 1 which has the problem
<html:form action="<action input="/vendorEntry.jsp" name="vendorEntryForm"
path="/VendorEntry" type="vendor.VendorEntryAction">
<forward name="detailsentered" path="/detailsenteredsuccessfully.jsp"/>
<forward name="alreadyexists" path="/alreadyreg.jsp"/>
<forward name="cudnotinsert" path="/erroroccured.jsp"/>
</action>"
name="vendorEntryForm"
type="vendor.VendorEntryForm">
<form name="form1" method="post" action="">
-----------
----------- text boxes
-----------n Submit button
</form>
</html:form>
Entry in My struts-config.xml for this jsp looks like this...
<form-beans>
---------------other entries
---------------
<form-bean name="vendorEntryForm" type="vendor.VendorEntryForm"/>
</form-beans>
<action input="/vendorEntry.jsp" name="vendorEntryForm"
path="/VendorEntry" type="vendor.VendorEntryAction">
<forward name="detailsentered" path="/detailsenteredsuccessfully.jsp"/>
<forward name="alreadyexists" path="/alreadyreg.jsp"/>
<forward name="cudnotinsert" path="/erroroccured.jsp"/>
</action>
Please tell me the probabale reasons.
Thanks in advance.
Regards,
Nilesh.