You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Theodoridis <ji...@tera.gr> on 2007/11/12 15:59:29 UTC

s2 and DispatchAction

Hello

In struts 1.x was using the DispatchAction  and with a parameter like 
action choosed wich action executed. Is there a way to do thiw in S2?

tnx

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


Re: [struts] s2 and DispatchAction

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Dale Newfield wrote:
> Jeromy Evans wrote:
>> I always use the following configuration to minimise the vulnerability::
>>
>> <action name="/home_*" method="do{1}">
>> </action>
>>
>> With that setting, only methods with the prefix "do" in their name 
>> can be executed.
>> ie. ?method:update calls doUpdate()
>
> Even if that does exactly what you expect it does (which I'm not 
> convinced about), all it does is change the names of the methods.  It 
> does nothing to mitigate the vulnerability of allowing any user with 
> sufficient credentials to call a single method in your action 
> ("doView", for example) the ability to call any method in that action.
>
> If you're set up to allow anybody to execute "doView" but only admins 
> to execute "doUpdate", then "/viewFoo.do?method:update" could be a 
> security hole whether the actual method being called is "update()" or 
> "doUpdate()".
>
> It's precisely analogous to the "/viewFoo!update.do" vulnerability, 
> which is closable by disabling "allowDynamicMethodCalls".  I'm simply 
> proposing that the same flag be used to address both vulnerabilities. 
> Another solution would be to add an explicit allow list (per action 
> class) for what methodNames would be allowed in "?method:methodName", 
> but I don't see a good place to put that whitelist, and recognize it's 
> just more configuration at a time when the struts developers are 
> trying to replace configuration with convention.
>
> -Dale
Right you are.  I just built a test app and the "?method:MY_METHOD_NAME" 
notation will execute any public method irrespective of the 
wildcard/dynamic method call settings.


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


Re: [struts] s2 and DispatchAction

Posted by Dale Newfield <Da...@Newfield.org>.
Jeromy Evans wrote:
> I always use the following configuration to minimise the vulnerability::
> 
> <action name="/home_*" method="do{1}">
> </action>
> 
> With that setting, only methods with the prefix "do" in their name can 
> be executed.
> ie. ?method:update calls doUpdate()

Even if that does exactly what you expect it does (which I'm not 
convinced about), all it does is change the names of the methods.  It 
does nothing to mitigate the vulnerability of allowing any user with 
sufficient credentials to call a single method in your action ("doView", 
for example) the ability to call any method in that action.

If you're set up to allow anybody to execute "doView" but only admins to 
execute "doUpdate", then "/viewFoo.do?method:update" could be a security 
hole whether the actual method being called is "update()" or "doUpdate()".

It's precisely analogous to the "/viewFoo!update.do" vulnerability, 
which is closable by disabling "allowDynamicMethodCalls".  I'm simply 
proposing that the same flag be used to address both vulnerabilities. 
Another solution would be to add an explicit allow list (per action 
class) for what methodNames would be allowed in "?method:methodName", 
but I don't see a good place to put that whitelist, and recognize it's 
just more configuration at a time when the struts developers are trying 
to replace configuration with convention.

-Dale

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


Re: [struts] s2 and DispatchAction

Posted by Dale Newfield <Da...@Newfield.org>.
Jeromy Evans wrote:
> It would be simple enough for the DefaultActionMapper to check a flag as 
> well except I think this would also prevent the method="METHOD_NAME" 
> notation from being used in struts.xml as well.

Urk!  I didn't realize that.  If true, that definitely means the simple 
solution is not viable.  Guess it's time to submit a JIRA bug and move 
this conversation to the dev list.

-Dale

P.S.:  https://issues.apache.org/struts/browse/WW-2316

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


Re: [struts] s2 and DispatchAction

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Dale Newfield wrote:
> Dave Newton wrote:
>> Does that deal with the submit button name thing?
>
>> --- Jeromy Evans <je...@blueskyminds.com.au>
>> wrote:
>>> <action name="/home_*" method="do{1}">
>>> </action>
>
> I don't believe so.  It just makes /home_update.do execute the 
> doUpdate() method (assuming it does the camelcase stuff implied).  It 
> doesn't change the naming scheme for all methods on that action class, 
> just provides a shorthand mapping from urls that begin "/home_".
>
Right.  The only benefit is that it prevents requests using the wildcard 
notation from calling  methods without the do prefix because doMethod is 
assumed.
> I would expect "/home_view.do?method:update" to call update(), not 
> doUpdate(), although "/home_view.do?method:doUpdate" should call 
> doUpdate().
>
> Note:  I've read code and theorized here, but not tested the hypotheses.
>
Right.  The DefaultActionMapper uses the method: prefix directly 
irrespective of the other settings.  Only the action:prefix accounts for 
dynamicMethodCalls.
It would be simple enough for the DefaultActionMapper to check a flag as 
well except I think this would also prevent the method="METHOD_NAME" 
notation from being used in struts.xml as well.



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


Re: [struts] s2 and DispatchAction

Posted by Dale Newfield <Da...@Newfield.org>.
Dave Newton wrote:
> Does that deal with the submit button name thing?

> --- Jeromy Evans <je...@blueskyminds.com.au>
> wrote:
>> <action name="/home_*" method="do{1}">
>> </action>

I don't believe so.  It just makes /home_update.do execute the 
doUpdate() method (assuming it does the camelcase stuff implied).  It 
doesn't change the naming scheme for all methods on that action class, 
just provides a shorthand mapping from urls that begin "/home_".

I would expect "/home_view.do?method:update" to call update(), not 
doUpdate(), although "/home_view.do?method:doUpdate" should call doUpdate().

Note:  I've read code and theorized here, but not tested the hypotheses.

-Dale

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


Re: [struts] s2 and DispatchAction

Posted by Dave Newton <ne...@yahoo.com>.
Does that deal with the submit button name thing?

d.

--- Jeromy Evans <je...@blueskyminds.com.au>
wrote:

> Dale Newfield wrote:
> > Don Brown wrote:
> >> Little known fact, but you can specify the method
> via:
> >>
> >> "?method:MY_METHOD_NAME"
> >>
> >> This code exists to support the method attribute
> on the submit tag,
> >> allowing you to submit the form to different
> methods based on what
> >> button is clicked.
> >
> > I wondered how the submit tag argument worked.
> > I would argue this is as big a security
> vulnerability as the 
> > "action!method" capability.  (As, for example, it
> can allow less 
> > privileged users to access more privileged methods
> that the author 
> > thought were protected via the url pattern by
> something like 
> >
>
org.acegisecurity.intercept.web.FilterSecurityInterceptor.)
>  Is there 
> > any way to restrict which methods are valid there,
> or to turn this 
> > capability off?
> >
> > -Dale
> I always use the following configuration to minimise
> the vulnerability::
> 
> <action name="/home_*" method="do{1}">
> 
> </action>
> 
> With that setting, only methods with the prefix "do"
> in their name can 
> be executed.
> ie. ?method:update calls doUpdate()
> 
> cheers,
>  Jeromy Evans
> 
>
---------------------------------------------------------------------
> 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: [struts] s2 and DispatchAction

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Dale Newfield wrote:
> Don Brown wrote:
>> Little known fact, but you can specify the method via:
>>
>> "?method:MY_METHOD_NAME"
>>
>> This code exists to support the method attribute on the submit tag,
>> allowing you to submit the form to different methods based on what
>> button is clicked.
>
> I wondered how the submit tag argument worked.
> I would argue this is as big a security vulnerability as the 
> "action!method" capability.  (As, for example, it can allow less 
> privileged users to access more privileged methods that the author 
> thought were protected via the url pattern by something like 
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.)  Is there 
> any way to restrict which methods are valid there, or to turn this 
> capability off?
>
> -Dale
I always use the following configuration to minimise the vulnerability::

<action name="/home_*" method="do{1}">

</action>

With that setting, only methods with the prefix "do" in their name can 
be executed.
ie. ?method:update calls doUpdate()

cheers,
 Jeromy Evans

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


Re: [struts] s2 and DispatchAction

Posted by Dale Newfield <Da...@Newfield.org>.
Moved from user list.

Dale Newfield wrote:
>> "?method:MY_METHOD_NAME"

> Is there any way to restrict which methods are valid there, or to
> turn this capability off?

Reading the source 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=markup

indicates the answer is "no".

I propose adding a check for "allowDynamicMethodCalls" in this code as 
well (which if not set would effectively ignore the parameter).  I 
recognize that this may break some functionality (namely alternate 
submit buttons in forms), but as this is really a vulnerability, I think 
it is important to address...
...and we could regain the submit button functionality with javascript 
that changes the form submission action url...

-Dale

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


Re: [struts] s2 and DispatchAction

Posted by Dale Newfield <Da...@Newfield.org>.
Don Brown wrote:
> Little known fact, but you can specify the method via:
> 
> "?method:MY_METHOD_NAME"
> 
> This code exists to support the method attribute on the submit tag,
> allowing you to submit the form to different methods based on what
> button is clicked.

I wondered how the submit tag argument worked.
I would argue this is as big a security vulnerability as the 
"action!method" capability.  (As, for example, it can allow less 
privileged users to access more privileged methods that the author 
thought were protected via the url pattern by something like 
org.acegisecurity.intercept.web.FilterSecurityInterceptor.)  Is there 
any way to restrict which methods are valid there, or to turn this 
capability off?

-Dale

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


Re: s2 and DispatchAction

Posted by Don Brown <do...@gmail.com>.
Little known fact, but you can specify the method via:

"?method:MY_METHOD_NAME"

This code exists to support the method attribute on the submit tag,
allowing you to submit the form to different methods based on what
button is clicked.

Don

On Nov 13, 2007 2:29 AM, Jim Theodoridis <ji...@tera.gr> wrote:
> How can i use a parameter to choose wich action executed?
>
> I have a crud action etc user.action
> is it possible to choose the action  fires  with a paramenter like
> user.action?action=list rather  than user!list.action?
>
>
>
>
> acogoluegnes@sqli.com wrote:
> > using wildcard:
> >
> > <action name="/home_*" method="{1}">
> >
> > </action>
> >
> > action URL for method login: /home_login
> >
> > see : http://struts.apache.org/2.x/docs/wildcard-mappings.html
> >
> >
> >
> >
> >> Hello
> >>
> >> In struts 1.x was using the DispatchAction  and with a parameter like
> >> action choosed wich action executed. Is there a way to do thiw in S2?
> >>
> >> tnx
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>

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


Re: s2 and DispatchAction

Posted by Dave Newton <ne...@yahoo.com>.
If you send in a param named "method:${aMethodName}"
would that work? Isn't that how the submits (for
example) work? I was looking at this a couple of weeks
ago but forgot already :(

d.

--- Ian Roughley <ia...@fdar.com> wrote:

> I wonder if you could use OGNL, i.e. ${paramName},
> although I have not 
> tested it.
> 
> acogoluegnes@sqli.com wrote:
> > as far as I know, no  :-(
> >
> >   
> >> How can i use a parameter to choose wich action
> executed?
> >>
> >> I have a crud action etc user.action
> >> is it possible to choose the action  fires  with
> a paramenter like
> >> user.action?action=list rather  than
> user!list.action?
> >>
> >>
> >>
> >> acogoluegnes@sqli.com wrote:
> >>     
> >>> using wildcard:
> >>>
> >>> <action name="/home_*" method="{1}">
> >>>
> >>> </action>
> >>>
> >>> action URL for method login: /home_login
> >>>
> >>> see :
>
http://struts.apache.org/2.x/docs/wildcard-mappings.html
> >>>
> >>>
> >>>
> >>>
> >>>       
> >>>> Hello
> >>>>
> >>>> In struts 1.x was using the DispatchAction  and
> with a parameter like
> >>>> action choosed wich action executed. Is there a
> way to do thiw in S2?
> >>>>
> >>>> tnx
> >>>>
> >>>>
>
---------------------------------------------------------------------
> >>>> 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
> >>
> >>
> >>
> >>
> >>
> >>     
> >
> >
> >
>
---------------------------------------------------------------------
> > 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 and DispatchAction

Posted by Ian Roughley <ia...@fdar.com>.
I wonder if you could use OGNL, i.e. ${paramName}, although I have not 
tested it.

acogoluegnes@sqli.com wrote:
> as far as I know, no  :-(
>
>   
>> How can i use a parameter to choose wich action executed?
>>
>> I have a crud action etc user.action
>> is it possible to choose the action  fires  with a paramenter like
>> user.action?action=list rather  than user!list.action?
>>
>>
>>
>> acogoluegnes@sqli.com wrote:
>>     
>>> using wildcard:
>>>
>>> <action name="/home_*" method="{1}">
>>>
>>> </action>
>>>
>>> action URL for method login: /home_login
>>>
>>> see : http://struts.apache.org/2.x/docs/wildcard-mappings.html
>>>
>>>
>>>
>>>
>>>       
>>>> Hello
>>>>
>>>> In struts 1.x was using the DispatchAction  and with a parameter like
>>>> action choosed wich action executed. Is there a way to do thiw in S2?
>>>>
>>>> tnx
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   

Re: s2 and DispatchAction

Posted by Dave Newton <ne...@yahoo.com>.
Not out of the box, correct (AFAIK, anyway :)

I'd probably take a look at your implementation,
however: if these are coming off of a link then
they're built easily with <s:url.../> tags, and
submits can define a "method" attribute.

(It's also a pretty no-brainer implementation, if
you're dead-set on doing it by parameter anyway.)

d.

--- acogoluegnes@sqli.com wrote:

> as far as I know, no  :-(
> 
> > How can i use a parameter to choose wich action
> executed?
> >
> > I have a crud action etc user.action
> > is it possible to choose the action  fires  with a
> paramenter like
> > user.action?action=list rather  than
> user!list.action?
> >
> >
> >
> > acogoluegnes@sqli.com wrote:
> >> using wildcard:
> >>
> >> <action name="/home_*" method="{1}">
> >>
> >> </action>
> >>
> >> action URL for method login: /home_login
> >>
> >> see :
>
http://struts.apache.org/2.x/docs/wildcard-mappings.html
> >>
> >>
> >>
> >>
> >>> Hello
> >>>
> >>> In struts 1.x was using the DispatchAction  and
> with a parameter like
> >>> action choosed wich action executed. Is there a
> way to do thiw in S2?
> >>>
> >>> tnx
> >>>
> >>>
>
---------------------------------------------------------------------
> >>> 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
> >
> >
> >
> >
> >
> 
> 
>
---------------------------------------------------------------------
> 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 and DispatchAction

Posted by Randy Burgess <RB...@nuvox.com>.
In the action mapping you can also use the method attribute, so for a single
action class you could have multiple actions, each using a different method.
Here is one of my actions where I have a list method.

<action name="securitySelector" class="securitySelectorAction"
method="list">
    
<result name="success">/securitySelector.jsp</result>

</action>

In the same class I use the execute method to save the data eventually
selected from the list method.


Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications



> From: <ac...@sqli.com>
> Reply-To: Struts Users Mailing List <us...@struts.apache.org>
> Date: Mon, 12 Nov 2007 17:08:14 +0100 (CET)
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: Re: s2 and DispatchAction
> 
> as far as I know, no  :-(
> 
>> How can i use a parameter to choose wich action executed?
>> 
>> I have a crud action etc user.action
>> is it possible to choose the action  fires  with a paramenter like
>> user.action?action=list rather  than user!list.action?
>> 
>> 
>> 
>> acogoluegnes@sqli.com wrote:
>>> using wildcard:
>>> 
>>> <action name="/home_*" method="{1}">
>>> 
>>> </action>
>>> 
>>> action URL for method login: /home_login
>>> 
>>> see : http://struts.apache.org/2.x/docs/wildcard-mappings.html
>>> 
>>> 
>>> 
>>> 
>>>> Hello
>>>> 
>>>> In struts 1.x was using the DispatchAction  and with a parameter like
>>>> action choosed wich action executed. Is there a way to do thiw in S2?
>>>> 
>>>> tnx
>>>> 
>>>> ---------------------------------------------------------------------
>>>> 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
>> 
>> 
>> 
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

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


Re: s2 and DispatchAction

Posted by ac...@sqli.com.
as far as I know, no  :-(

> How can i use a parameter to choose wich action executed?
>
> I have a crud action etc user.action
> is it possible to choose the action  fires  with a paramenter like
> user.action?action=list rather  than user!list.action?
>
>
>
> acogoluegnes@sqli.com wrote:
>> using wildcard:
>>
>> <action name="/home_*" method="{1}">
>>
>> </action>
>>
>> action URL for method login: /home_login
>>
>> see : http://struts.apache.org/2.x/docs/wildcard-mappings.html
>>
>>
>>
>>
>>> Hello
>>>
>>> In struts 1.x was using the DispatchAction  and with a parameter like
>>> action choosed wich action executed. Is there a way to do thiw in S2?
>>>
>>> tnx
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
>
>
>


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


Re: s2 and DispatchAction

Posted by Jim Theodoridis <ji...@tera.gr>.
How can i use a parameter to choose wich action executed?

I have a crud action etc user.action
is it possible to choose the action  fires  with a paramenter like  
user.action?action=list rather  than user!list.action?



acogoluegnes@sqli.com wrote:
> using wildcard:
>
> <action name="/home_*" method="{1}">
>
> </action>
>
> action URL for method login: /home_login
>
> see : http://struts.apache.org/2.x/docs/wildcard-mappings.html
>
>
>
>   
>> Hello
>>
>> In struts 1.x was using the DispatchAction  and with a parameter like
>> action choosed wich action executed. Is there a way to do thiw in S2?
>>
>> tnx
>>
>> ---------------------------------------------------------------------
>> 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 and DispatchAction

Posted by ac...@sqli.com.
using wildcard:

<action name="/home_*" method="{1}">

</action>

action URL for method login: /home_login

see : http://struts.apache.org/2.x/docs/wildcard-mappings.html



> Hello
>
> In struts 1.x was using the DispatchAction  and with a parameter like
> action choosed wich action executed. Is there a way to do thiw in S2?
>
> tnx
>
> ---------------------------------------------------------------------
> 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