You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jake Robb <jr...@sircon.com> on 2007/11/06 14:55:44 UTC
[S2] Restricting paths?
I have an action called MainMenu. It's defined as follows:
<action name="MainMenu" class="mainMenuAction">
<result name="success" type="tiles">mainMenu</result>
</action>
(I'm using the Spring plugin - mainMenuAction is the name of the spring
bean)
I want MainMenu to be accessible at the following URL:
http://server/main/MainMenu.action
And, as expected, it is available there. However, it's also available
at any of these:
http://server/MainMenu.action
http://server/what/MainMenu.action
http://server/foo/MainMenu.action
http://server/bar/MainMenu.action
http://server/arbitrarily/long/path/MainMenu.action
etc.
I tried changing the action definition like so:
<action name="/main/MainMenu" class="mainMenuAction">
<result name="success" type="tiles">mainMenu</result>
</action>
But now my action isn't available at *any* path.
How can I restrict access to the action to only the path(s) I want?
Thanks!
-Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: [S2] Restricting paths?
Posted by Jake Robb <jr...@sircon.com>.
Thanks, that did it! I didn't have namespace attributes for any of my
packages. :)
-----Original Message-----
From: Gary Affonso [mailto:glists2@greywether.com]
Sent: Tuesday, November 06, 2007 9:33 AM
To: Struts Users Mailing List
Subject: Re: [S2] Restricting paths?
Did you checkout the namespace setting of your package?
- Gary
Jake Robb wrote:
> I have an action called MainMenu. It's defined as follows:
>
> <action name="MainMenu" class="mainMenuAction">
> <result name="success" type="tiles">mainMenu</result>
> </action>
>
> (I'm using the Spring plugin - mainMenuAction is the name of the
spring
> bean)
>
> I want MainMenu to be accessible at the following URL:
>
> http://server/main/MainMenu.action
>
> And, as expected, it is available there. However, it's also available
> at any of these:
>
> http://server/MainMenu.action
> http://server/what/MainMenu.action
> http://server/foo/MainMenu.action
> http://server/bar/MainMenu.action
> http://server/arbitrarily/long/path/MainMenu.action
>
> etc.
>
> I tried changing the action definition like so:
>
> <action name="/main/MainMenu" class="mainMenuAction">
> <result name="success" type="tiles">mainMenu</result>
> </action>
>
> But now my action isn't available at *any* path.
>
> How can I restrict access to the action to only the path(s) I want?
>
> Thanks!
>
> -Jake
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Restricting paths?
Posted by Gary Affonso <gl...@greywether.com>.
Did you checkout the namespace setting of your package?
- Gary
Jake Robb wrote:
> I have an action called MainMenu. It's defined as follows:
>
> <action name="MainMenu" class="mainMenuAction">
> <result name="success" type="tiles">mainMenu</result>
> </action>
>
> (I'm using the Spring plugin - mainMenuAction is the name of the spring
> bean)
>
> I want MainMenu to be accessible at the following URL:
>
> http://server/main/MainMenu.action
>
> And, as expected, it is available there. However, it's also available
> at any of these:
>
> http://server/MainMenu.action
> http://server/what/MainMenu.action
> http://server/foo/MainMenu.action
> http://server/bar/MainMenu.action
> http://server/arbitrarily/long/path/MainMenu.action
>
> etc.
>
> I tried changing the action definition like so:
>
> <action name="/main/MainMenu" class="mainMenuAction">
> <result name="success" type="tiles">mainMenu</result>
> </action>
>
> But now my action isn't available at *any* path.
>
> How can I restrict access to the action to only the path(s) I want?
>
> Thanks!
>
> -Jake
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org