aspose file tools*
The moose likes Struts and the fly likes DynaActionForm with ActionMapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "DynaActionForm with ActionMapping" Watch "DynaActionForm with ActionMapping" New topic
Author

DynaActionForm with ActionMapping

Bloo Barton
Ranch Hand

Joined: May 09, 2005
Posts: 63
I am trying to tie my JSP to a DynaActionForm and Action Class.
When I try to view page I receive error
"javax.servlet.jsp.JspException: Cannot retrieve mapping for action /submitForm"

Here is how my form-bean, action-mapping, and form look.
Ideas?

<form-bean name="submitForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="foo1" type="java.lang.String" />
<form-property name="foo2" type="java.lang.String" />
</form-bean>

<action
path="/SubmitForm"
unknown="false"
name="submitForm"
scope="request"
input="/SubmitView.jsp"
type="SubmitAction"
validate="false"/>

<html:form action="/submitForm" focus="MedicareNumber">
<fmt:message key="label.foo1"/><html:text property="foo1"/>
<fmt:message key="label.foo2"/><html:text property="foo2"/>
</html:form>
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

It is case sensitive. Look at the 'S'.


A good workman is known by his tools.
Bloo Barton
Ranch Hand

Joined: May 09, 2005
Posts: 63
Marc,

Thanks for pointing that out. Ironically while it looks like a capitalization error, which it kind of is... That was not really my problem.

I thought that in the <html:form> tag that the action attribute was supposed to coincide with the action-mapping name attribute. From what you said, and then changing my form tag it appears the <html:form> action attribute should coincide with the action-mapping path attribute instead. Am I understanding correctly now?

Thanks!
 
Don't get me started about those stupid light bulbs.
 
subject: DynaActionForm with ActionMapping