You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Muthu Velappan <mu...@aspiresys.com> on 2009/09/23 09:10:10 UTC
Switching Action between different modules...
Hi,
I have 3 different modules in my project and added that into struts.xml like
this
<!-- Membership module actions -->
<include file="membership.xml" />
<include file="home.xml" />
<include file="admin.xml" />
I got a feedback.jsp page in admin module. When user hit the cancel button
from this form, I want that to submit to home.action available in home
module. Since I don't have the namespace option in submit button tag, this
is how I added this it in my submit button
<s:submit type="image" src="../bis-images/button_send.png"
action="/home/HomeL" align="right" theme="simple" />
but it is not working. It throws the following exception. Can anyone please
let me know where I'm going wrong.
Struts Problem Report
Struts has detected an unhandled exception:
Messages:
* There is no Action mapped for namespace /admin and action name
/home/Home.
_____
Stacktraces
There is no Action mapped for namespace /admin and action name /home/Home. -
[unknown location]
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
78)
Thanks,
Muthu
Re: Switching Action between different modules...
Posted by Wes Wannemacher <we...@wantii.com>.
One easy fix would be to add another result to your /admin namespace
that redirects to /home/Home... i.e.
<action name="goHome" class="com.opensymphony.xwork2.ActionSupport">
<result type="redirectAction">
<param name="actionName">Home</param>
<param name="namespace">/home</param>
</result>
</action>
Then, link your s:submit to 'goHome'
Of course, if you want to use this everywhere, define this result as a
global-result in your parent package and have the rest of your
packages extend it.
-Wes
On Wed, Sep 23, 2009 at 8:10 AM, Muthu Velappan
<mu...@aspiresys.com> wrote:
> Chris,
>
> This is the content of my home.xml
>
> <package name="home" namespace="/home"
> extends="propelj">
> <action name="Home"
> class="com.asp.web.home.HomeAction">
> <interceptor-ref name="defaultInsecureStack" />
> <result name="input">/membership/Home.jsp</result>
> </action>
> </package>
>
> It's namespace is /home where as admin.xml's namespace will be "/admin" and
> that's where feedback.jsp related actions are configured.
>
> ~Muthu
>
> -----Original Message-----
> From: musomesa@aol.com [mailto:musomesa@aol.com]
> Sent: Wednesday, September 23, 2009 3:23 PM
> To: user@struts.apache.org
> Subject: Re: Switching Action between different modules...
>
>
> The name of the xml file is immaterial -- what is the namespace attribute
> on the package you defined inside of home.xml?
> I would use the config-browser to check that the configuration is what you
> intended.
>
>
>
>
>
> Chris
>
>
>
>
>
>
> -----Original Message-----
> From: Muthu Velappan <mu...@aspiresys.com>
> To: user@struts.apache.org
> Sent: Wed, Sep 23, 2009 3:10 am
> Subject: Switching Action between different modules...
>
>
>
>
>
>
>
>
>
>
> Hi,
>
>
>
> I have 3 different modules in my project and added that into struts.xml like
> this
>
>
>
> <!-- Membership module actions -->
>
> <include file="membership.xml" />
>
> <include file="home.xml" />
>
> <include file="admin.xml" />
>
>
>
> I got a feedback.jsp page in admin module. When user hit the cancel button
> from this form, I want that to submit to home.action available in home
> module. Since I don't have the namespace option in submit button tag, this
> is how I added this it in my submit button
>
>
>
> <s:submit type="image" src="../bis-images/button_send.png"
>
> action="/home/HomeL" align="right" theme="simple" />
>
>
>
> but it is not working. It throws the following exception. Can anyone please
> let me know where I'm going wrong.
>
>
> Struts Problem Report
>
>
> Struts has detected an unhandled exception:
>
>
> Messages:
>
> * There is no Action mapped for namespace /admin and action name
> /home/Home.
>
> _____
>
>
> Stacktraces
>
>
> There is no Action mapped for namespace /admin and action name /home/Home. -
> [unknown location]
>
>
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
> 78)
>
>
>
> Thanks,
>
> Muthu
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Switching Action between different modules...
Posted by Muthu Velappan <mu...@aspiresys.com>.
Chris,
This is the content of my home.xml
<package name="home" namespace="/home"
extends="propelj">
<action name="Home"
class="com.asp.web.home.HomeAction">
<interceptor-ref name="defaultInsecureStack" />
<result name="input">/membership/Home.jsp</result>
</action>
</package>
It's namespace is /home where as admin.xml's namespace will be "/admin" and
that's where feedback.jsp related actions are configured.
~Muthu
-----Original Message-----
From: musomesa@aol.com [mailto:musomesa@aol.com]
Sent: Wednesday, September 23, 2009 3:23 PM
To: user@struts.apache.org
Subject: Re: Switching Action between different modules...
The name of the xml file is immaterial -- what is the namespace attribute
on the package you defined inside of home.xml?
I would use the config-browser to check that the configuration is what you
intended.
Chris
-----Original Message-----
From: Muthu Velappan <mu...@aspiresys.com>
To: user@struts.apache.org
Sent: Wed, Sep 23, 2009 3:10 am
Subject: Switching Action between different modules...
Hi,
I have 3 different modules in my project and added that into struts.xml like
this
<!-- Membership module actions -->
<include file="membership.xml" />
<include file="home.xml" />
<include file="admin.xml" />
I got a feedback.jsp page in admin module. When user hit the cancel button
from this form, I want that to submit to home.action available in home
module. Since I don't have the namespace option in submit button tag, this
is how I added this it in my submit button
<s:submit type="image" src="../bis-images/button_send.png"
action="/home/HomeL" align="right" theme="simple" />
but it is not working. It throws the following exception. Can anyone please
let me know where I'm going wrong.
Struts Problem Report
Struts has detected an unhandled exception:
Messages:
* There is no Action mapped for namespace /admin and action name
/home/Home.
_____
Stacktraces
There is no Action mapped for namespace /admin and action name /home/Home. -
[unknown location]
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
78)
Thanks,
Muthu
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Switching Action between different modules...
Posted by mu...@aol.com.
The name of the xml file is immaterial -- what is the namespace attribute on the package you defined inside of home.xml?
I would use the config-browser to check that the configuration is what you intended.
Chris
-----Original Message-----
From: Muthu Velappan <mu...@aspiresys.com>
To: user@struts.apache.org
Sent: Wed, Sep 23, 2009 3:10 am
Subject: Switching Action between different modules...
Hi,
I have 3 different modules in my project and added that into struts.xml like
this
<!-- Membership module actions -->
<include file="membership.xml" />
<include file="home.xml" />
<include file="admin.xml" />
I got a feedback.jsp page in admin module. When user hit the cancel button
from this form, I want that to submit to home.action available in home
module. Since I don't have the namespace option in submit button tag, this
is how I added this it in my submit button
<s:submit type="image" src="../bis-images/button_send.png"
action="/home/HomeL" align="right" theme="simple" />
but it is not working. It throws the following exception. Can anyone please
let me know where I'm going wrong.
Struts Problem Report
Struts has detected an unhandled exception:
Messages:
* There is no Action mapped for namespace /admin and action name
/home/Home.
_____
Stacktraces
There is no Action mapped for namespace /admin and action name /home/Home. -
[unknown location]
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:1
78)
Thanks,
Muthu