s2 and DispatchAction

2007-11-12 Thread Jim Theodoridis
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: [EMAIL PROTECTED] For additional commands, e-mail

Re: s2 and DispatchAction

2007-11-12 Thread acogoluegnes
using wildcard: 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 > >

Re: s2 and DispatchAction

2007-11-12 Thread Jim Theodoridis
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? [EMAIL PROTECTED] wrote: using wildcard: action URL for method login

Re: s2 and DispatchAction

2007-11-12 Thread acogoluegnes
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? > > > > [EMAIL PROTECTED] wrote: >> using wil

Re: s2 and DispatchAction

2007-11-12 Thread Dave Newton
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 tags, and submits can define a "method" attribute. (It's also a pretty no-brainer implementation, if you're dead-set on doing i

Re: s2 and DispatchAction

2007-11-12 Thread Randy Burgess
data eventually selected from the list method. Regards, Randy Burgess Web Applications Developer Nuvox Communications > From: <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Mon, 12 Nov 2007 17:08:14 +0100 (CET) > To: Struts Users Mailing List >

Re: s2 and DispatchAction

2007-11-12 Thread Ian Roughley
I wonder if you could use OGNL, i.e. ${paramName}, although I have not tested it. [EMAIL PROTECTED] 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

Re: s2 and DispatchAction

2007-11-12 Thread Dave Newton
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 <[EMAIL PROTECTED]> wrote: > I wonder if you could use OGNL, i.e. ${paramName}, > although I

Re: s2 and DispatchAction

2007-11-12 Thread Don Brown
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 <[EMAIL PROTECTE

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Dale Newfield
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 wor

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Jeromy Evans
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 s

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Dave Newton
Does that deal with the submit button name thing? d. --- Jeromy Evans <[EMAIL PROTECTED]> 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

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Dale Newfield
Jeromy Evans wrote: I always use the following configuration to minimise the vulnerability:: 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

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Dale Newfield
Dave Newton wrote: Does that deal with the submit button name thing? --- Jeromy Evans <[EMAIL PROTECTED]> wrote: 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

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Jeromy Evans
Dale Newfield wrote: Jeromy Evans wrote: I always use the following configuration to minimise the vulnerability:: 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 (whi

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Jeromy Evans
Dale Newfield wrote: Dave Newton wrote: Does that deal with the submit button name thing? --- Jeromy Evans <[EMAIL PROTECTED]> wrote: 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

Re: [struts] s2 and DispatchAction

2007-11-12 Thread Dale Newfield
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