You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Howard Moore <Ho...@Datapulse.com> on 2001/01/22 18:40:29 UTC

FormTag problem

I have the following action configured in my struts-config.xml file;

    <action    path="/admin/login"
               type="com.datapulse.views.admin.LoginAction"
               name="userActionForm"
               scope="request"
               input="/jsp/admin/login.jsp">
    </action>

and am trying to link to it from a jsp page using the FormTag.

I expected the following to work;

    <html:form action="/admin/login.do" scope="request">

but it throws a ServletException with the message; 

    Cannot retrieve mapping for specified form action path "/login"

It appears that the path ("/admin") part of the action is being stripped
before looking up the mapping. Should this really be done and, if so, how
can I create a FormTag to call my Action?

Help would be appreciated.

-------------------------------------------
Howard Moore
Senior Software Engineer
Datapulse CTI
Tel : +44 (0)1491 418000
Fax : +44 (0)1491 411459
E-mail: Howard.Moore@datapulse.com

Re: FormTag problem

Posted by Anand Raman <an...@mymailbag.com>.
hi Howard
sorry for the late response but what kind of a mapping have u specified
in the web.xml file.
I think that too matters a lot to rightly match all the actions..

Thanks
Anand 

On Mon, Jan 22, 2001 at 05:40:29PM -0000, Howard Moore wrote:
>I have the following action configured in my struts-config.xml file;
>
>    <action    path="/admin/login"
>               type="com.datapulse.views.admin.LoginAction"
>               name="userActionForm"
>               scope="request"
>               input="/jsp/admin/login.jsp">
>    </action>
>
>and am trying to link to it from a jsp page using the FormTag.
>
>I expected the following to work;
>
>    <html:form action="/admin/login.do" scope="request">
>
>but it throws a ServletException with the message; 
>
>    Cannot retrieve mapping for specified form action path "/login"
>
>It appears that the path ("/admin") part of the action is being stripped
>before looking up the mapping. Should this really be done and, if so, how
>can I create a FormTag to call my Action?
>
>Help would be appreciated.
>
>-------------------------------------------
>Howard Moore
>Senior Software Engineer
>Datapulse CTI
>Tel : +44 (0)1491 418000
>Fax : +44 (0)1491 411459
>E-mail: Howard.Moore@datapulse.com