You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Navjot Singh <na...@net4india.net> on 2003/03/13 15:41:35 UTC
unable to find mapping
hi guys,
I have a jsp file resding on my machine in "/jsp/user/reg.jsp" and this is
the form tag
<html:form action="/Register.do" focus="username" method="post">
.....html tags here
</html:form>
and i have struts-user.xml as config for user module with a form-bean and
action mapping set as
<form-beans>
<form-bean name="UserRegForm" type="myapp.user.form.UserRegForm"/>
</form-beans>
<action-mappings>
<action name="UserRegForm" path="/Register" scope="request"
input="/jsp/user/reg.jsp" type="myapp.user.action.UserRegAction">
<forward name="success" path="/jsp/success.jsp"/>
</action>
</action-mappings>
Now when i call http://localhost/myapp/jsp/user/reg.jsp it throws an error
org.apache.jasper.JasperException: Cannot retrieve mapping for action
/Register
I must be doing something terribly wrong. Please guide me.
-navjot
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: unable to find mapping
Posted by Eddie Bush <ek...@swbell.net>.
Your issues revolves around the fact that, unless you go through the
controller (ie. invoke your JSPs through an action - thus involving the
controller in the request) you do *NOT* have any configuration data in
the request for your modules. What you need to do to solve your problem
is have an action that forwards to your JSP. It doesn't have to be
anything fancy. You could either use a global, context-relative global
forward, a ForwardAction, or just an action with it's forward atribute
set to the path of your JSP. There's lots of ways to do it - but you've
*got* to go through the controller!
Navjot Singh wrote:
>hi guys,
>
>I have a jsp file resding on my machine in "/jsp/user/reg.jsp" and this is
>the form tag
>
><html:form action="/Register.do" focus="username" method="post">
>.....html tags here
></html:form>
>
>and i have struts-user.xml as config for user module with a form-bean and
>action mapping set as
>
><form-beans>
> <form-bean name="UserRegForm" type="myapp.user.form.UserRegForm"/>
></form-beans>
><action-mappings>
> <action name="UserRegForm" path="/Register" scope="request"
> input="/jsp/user/reg.jsp" type="myapp.user.action.UserRegAction">
> <forward name="success" path="/jsp/success.jsp"/>
> </action>
></action-mappings>
>
>
>Now when i call http://localhost/myapp/jsp/user/reg.jsp it throws an error
>
>org.apache.jasper.JasperException: Cannot retrieve mapping for action
>/Register
>
>I must be doing something terribly wrong. Please guide me.
>
>-navjot
>
--
Eddie Bush
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: unable to find mapping
Posted by Marco Tedone <m_...@hotmail.com>.
Which is the path of your application?
> -----Original Message-----
> From: Navjot Singh [mailto:navjot.s@net4india.net]
> Sent: Thursday, March 13, 2003 2:42 PM
> To: struts-user@jakarta.apache.org
> Subject: unable to find mapping
>
>
> hi guys,
>
> I have a jsp file resding on my machine in
> "/jsp/user/reg.jsp" and this is the form tag
>
> <html:form action="/Register.do" focus="username"
> method="post"> .....html tags here </html:form>
>
> and i have struts-user.xml as config for user module with a
> form-bean and action mapping set as
>
> <form-beans>
> <form-bean name="UserRegForm" type="myapp.user.form.UserRegForm"/>
> </form-beans>
> <action-mappings>
> <action name="UserRegForm" path="/Register" scope="request"
> input="/jsp/user/reg.jsp" type="myapp.user.action.UserRegAction">
> <forward name="success" path="/jsp/success.jsp"/>
> </action>
> </action-mappings>
>
>
> Now when i call http://localhost/myapp/jsp/user/reg.jsp it
> throws an error
>
> org.apache.jasper.JasperException: Cannot retrieve mapping
> for action /Register
>
> I must be doing something terribly wrong. Please guide me.
>
> -navjot
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org