This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DynaActionForm with ActionMapping

 
Bloo Barton
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is case sensitive. Look at the 'S'.
 
Bloo Barton
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic