You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alvaro Sanchez-Mariscal <al...@gmail.com> on 2007/08/24 17:05:04 UTC
Actions with same name but different packages & namespaces
Hi,
Is it possible to have actions with the same name but different
packages & namespaces?
<package name="dashboard" extends="hidra3-default">
<action name="main">
<result>/WEB-INF/jsp/dashboard/main.jsp</result>
</action>
</package>
<package name="search" extends="hidra3-default">
<action name="main">
<result>/WEB-INF/jsp/search/main.jsp</result>
</action>
</package>
Always, the first JSP declared in the XML file is returned. If we
change action name to be uniques, everything works.
What's wrong?
--
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
alvaro.sanchezmariscal@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Actions with same name but different packages & namespaces
Posted by Alvaro Sanchez-Mariscal <al...@gmail.com>.
You're right. I assumed that default namespace was package name.
Thank you!.
On 8/25/07, Laurie Harper <la...@holoweb.net> wrote:
> Alvaro Sanchez-Mariscal wrote:
> > Hi,
> >
> > Is it possible to have actions with the same name but different
> > packages & namespaces?
> >
> > <package name="dashboard" extends="hidra3-default">
> > <action name="main">
> > <result>/WEB-INF/jsp/dashboard/main.jsp</result>
> > </action>
> > </package>
> >
> > <package name="search" extends="hidra3-default">
> > <action name="main">
> > <result>/WEB-INF/jsp/search/main.jsp</result>
> > </action>
> > </package>
> >
> > Always, the first JSP declared in the XML file is returned. If we
> > change action name to be uniques, everything works.
> >
> > What's wrong?
>
> What's wrong is that you don't have different packages & namespaces; you
> only have different packages. A package is not the same thing as a
> namespace.
>
> http://struts.apache.org/2.x/docs/package-configuration.html
> http://struts.apache.org/2.x/docs/namespace-configuration.html
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
alvaro.sanchezmariscal@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Actions with same name but different packages & namespaces
Posted by Laurie Harper <la...@holoweb.net>.
Alvaro Sanchez-Mariscal wrote:
> Hi,
>
> Is it possible to have actions with the same name but different
> packages & namespaces?
>
> <package name="dashboard" extends="hidra3-default">
> <action name="main">
> <result>/WEB-INF/jsp/dashboard/main.jsp</result>
> </action>
> </package>
>
> <package name="search" extends="hidra3-default">
> <action name="main">
> <result>/WEB-INF/jsp/search/main.jsp</result>
> </action>
> </package>
>
> Always, the first JSP declared in the XML file is returned. If we
> change action name to be uniques, everything works.
>
> What's wrong?
What's wrong is that you don't have different packages & namespaces; you
only have different packages. A package is not the same thing as a
namespace.
http://struts.apache.org/2.x/docs/package-configuration.html
http://struts.apache.org/2.x/docs/namespace-configuration.html
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org