You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by jason moors <ja...@gmail.com> on 2005/10/31 22:44:28 UTC

Call Actions in a different module from default module

Hi,

I've written a struts application which I've split into a number of
modules, i.e user, account etc.

I want to have a login form on the home page to allow the user to
login, however all the user management actions e.g createUserAction,
loginAction, logoffAction and corresponding forms are defined in
another module in the struts-config-user.xml config file.

I've created a home.jsp page which contains a form, using the
html:form and html:text tags, and have included the necessary taglibs.

I have set the form action to "/user/login", which corresponds to the
"/login" action within the struts-config-user.xml.

However when I run the application I'm getting the following error :-

javax.servlet.jsp.JspException: Cannot retrieve mapping for action /user/login
	at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
	at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
	at org.apache.jsp.Home_jsp._jspx_meth_html_form_0(org.apache.jsp.Home_jsp:169)
	at org.apache.jsp.Home_jsp._jspx_meth_html_html_0(org.apache.jsp.Home_jsp:124)

which seems to imply that the jsp page can not see the action mapping
defined in a different module.

Therefore is it possible to use an action in a different module from
the default module. If not is there any way I could replicate this
functionality by duplicating the form bean?

Any help would be gratefully received.

Thanks

Jason.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Call Actions in a different module from default module

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Jason,  the "user" mailing list is more appropriate for this type of
question. The dev mailing list is "to communicate with other developers
interested in expanding and improving the functionality supported by Struts
itself"

   http://struts.apache.org/mail.html

Niall

----- Original Message ----- 
From: "jason moors" <ja...@gmail.com>
Sent: Monday, October 31, 2005 9:44 PM


Hi,

I've written a struts application which I've split into a number of
modules, i.e user, account etc.

I want to have a login form on the home page to allow the user to
login, however all the user management actions e.g createUserAction,
loginAction, logoffAction and corresponding forms are defined in
another module in the struts-config-user.xml config file.

I've created a home.jsp page which contains a form, using the
html:form and html:text tags, and have included the necessary taglibs.

I have set the form action to "/user/login", which corresponds to the
"/login" action within the struts-config-user.xml.

However when I run the application I'm getting the following error :-

javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/user/login
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at
org.apache.jsp.Home_jsp._jspx_meth_html_form_0(org.apache.jsp.Home_jsp:169)
at
org.apache.jsp.Home_jsp._jspx_meth_html_html_0(org.apache.jsp.Home_jsp:124)

which seems to imply that the jsp page can not see the action mapping
defined in a different module.

Therefore is it possible to use an action in a different module from
the default module. If not is there any way I could replicate this
functionality by duplicating the form bean?

Any help would be gratefully received.

Thanks

Jason.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org