Re: Re: Re: Url rewriting of .action to .jsp

2013-09-25 Thread Ken McWilliams
...more often than not, NOT what I want (wrt: "Maybe it's just me but for some reason this is more often than not what I want (I want the model towards the request but not towards the view), so I need to forgo ModelDriven."). Sorry everyone! On Wed, Sep 25, 2013 at 7:39 PM, Ken McWilliams wrote:

Re: Re: Re: Url rewriting of .action to .jsp

2013-09-25 Thread Ken McWilliams
Sorry should have read the last couple lines before posting! It was in defense of ModelBacking suggesting that the congruent structure could allow us to publish the action into the stack and then handle it knowing the interface. A certain result type for instance could require a specific backing mo

Re: Re: Re: Url rewriting of .action to .jsp

2013-09-25 Thread Ken McWilliams
Not sure if this is the place to bring this up, this is an annoyance coming from ModelDriven may offer a solution... Issue: It's hard to get past the model if you want to add more attributes to the action. Also when using ModelDriven the same view of the action is applied from the HTTP side as the

Prevent Ajax Multi-Request in Struts 2

2013-09-25 Thread Alireza Fattahi
Hi, We want to avoid multi-request sent via Ajax in struts 2 web based application. The `s:token` can be used in regular request-response jsp pages, but it will not work for ajax requests. The problem is the returned respond, which does not populate new value for struts token. I found this iss

Re: Translation of fieldName in annotated validations

2013-09-25 Thread JOSE L MARTINEZ-AVIAL
Well, I have found a workaround that is not much of a hacking. The annotations has a messageParameters that is evaluated against the valuestack. Since the action is in the valuestack, and it implements ActionSupport,I can pass a parameter that is a call to getText. requiredStrings =

Re: About S2-019, is it safe to re-enable DMI ?

2013-09-25 Thread bphill...@ku.edu
"Ok, but i mean how is it possible to not use DMI "with struts convention plugin". We prefer the convention over configuration approch. " I don't believe DMI is required to use the Struts Convention plugin. For example see the annotations tutorial in the Struts 2 examples (the link I sent you ea

Re: About S2-019, is it safe to re-enable DMI ?

2013-09-25 Thread Eric Chatellier
Le 25/09/2013 15:37, bphill...@ku.edu a écrit : > "If not, how is it possible to not use DMI ? " > > See - http://struts.apache.org/release/2.3.x/docs/getting-started.html - the > tutorial on using Wildcard Method Selection may be helpful. Ok, but i mean how is it possible to not use DMI "with stru

Re: Translation of fieldName in annotated validations

2013-09-25 Thread JOSE L MARTINEZ-AVIAL
I just created the issue https://issues.apache.org/jira/browse/WW-4208. I maybe able to provide a patch for this, if I have time for it. 2013/9/25 JOSE L MARTINEZ-AVIAL > I will open a ticket. My idea is to add a parameter to the annotation > called keyArgs, which would be a String array. It w

Re: Translation of fieldName in annotated validations

2013-09-25 Thread JOSE L MARTINEZ-AVIAL
I will open a ticket. My idea is to add a parameter to the annotation called keyArgs, which would be a String array. It would be used as follows: requiredStrings = {@RequiredStringValidator(type = ValidatorType.SIMPLE, keyArgs={"email","one","two"}

Re: About S2-019, is it safe to re-enable DMI ?

2013-09-25 Thread bphill...@ku.edu
"If not, how is it possible to not use DMI ? " See - http://struts.apache.org/release/2.3.x/docs/getting-started.html - the tutorial on using Wildcard Method Selection may be helpful. Using the ! (bang) operator and dynamic method invocation is a security problem. See: http://www.brucephillips

Re: Translation of fieldName in annotated validations

2013-09-25 Thread Lukasz Lenart
2013/9/25 JOSE L MARTINEZ-AVIAL : > I have javascript controls for the client-side validation, but we also want > to implement server-side validation. I'm not criticizing the framework, I > really really like it. I'm just wondering if the validations could be a > little more flexible to allow reusi

Re: Translation of fieldName in annotated validations

2013-09-25 Thread Chris
I understand (I wrote both : JavaScript and Java) and it is a very fair concern, that I will follow closely because it is not to be excluded. De : JOSE L MARTINEZ-AVIAL À : Struts Users Mailing List ; Chris Envoyé le : Mercredi 25 septembre 2013 14h54 Obj

Re: Translation of fieldName in annotated validations

2013-09-25 Thread JOSE L MARTINEZ-AVIAL
I have javascript controls for the client-side validation, but we also want to implement server-side validation. I'm not criticizing the framework, I really really like it. I'm just wondering if the validations could be a little more flexible to allow reusing message properties. 2013/9/25 Chris

Re: action class

2013-09-25 Thread Dave Newton
On Wed, Sep 25, 2013 at 7:29 AM, Muniasamy Kanthasamy wrote: > CGI will do that. But Struts/servlet has designed to overcome that. > It will create one service and serve for all requests > Servlets and Struts 1 actions are instantiated "once" (not strictly true, but in general). Struts 2 actions

Re: Translation of fieldName in annotated validations

2013-09-25 Thread Chris
Hello, It is only a proposal, but you might also use JavaScript controls. The same JavaScript Code could be use with several forms or pages. But you can also prefer using the mapping field to Java Beans. ( or both ) Regards Chris De : JOSE L MARTINEZ-AVIAL

Re: action class

2013-09-25 Thread Yaragalla Muralidhar
I think Dave is right. in struts 1 action is a singleton but in 2 it gets created per request. Anyway thank. *Thanks and Regards,* Muralidhar Yaragalla. * * On Wed, Sep 25, 2013 at 4:58 PM, Dave Newton wrote: > Yes. Actions are created per-request. > On Sep 25, 2013 7:19 AM, "Yaragalla Muralid

Re: action class

2013-09-25 Thread Umesh Awasthi
Short answer is Yes, for every new request , a new instance will be created reason for this is simple, your action classes also work as Model in MVC and in order to take care of thread safety, its better to create a new instance. On Wed, Sep 25, 2013 at 4:39 PM, Yaragalla Muralidhar < yaragallam

Re: action class

2013-09-25 Thread Dave Newton
Yes. Actions are created per-request. On Sep 25, 2013 7:19 AM, "Yaragalla Muralidhar" wrote: > will action class gets created for every new request even when new request > is also to the previous actionclass? > > *Thanks and Regards,* > Muralidhar Yaragalla. > * > * >

Re: action class

2013-09-25 Thread Muniasamy Kanthasamy
Here is my idea, CGI will do that. But Struts/servlet has designed to overcome that. It will create one service and serve for all requests On Wed, Sep 25, 2013 at 7:09 AM, Yaragalla Muralidhar < yaragallamur...@gmail.com> wrote: > will action class gets created for every new request even when n

action class

2013-09-25 Thread Yaragalla Muralidhar
will action class gets created for every new request even when new request is also to the previous actionclass? *Thanks and Regards,* Muralidhar Yaragalla. * *

Re: Translation of fieldName in annotated validations

2013-09-25 Thread JOSE L MARTINEZ-AVIAL
Yes, what I would like is to define a message for each validator that could be reused with any field just by having the fieldname translated. Let's say I have a form to create an user, with fields First name, Last name and Email, where all the fields are required. I would define the following prope

Re: About S2-019, is it safe to re-enable DMI ?

2013-09-25 Thread Lukasz Lenart
2013/9/25 Eric Chatellier : > Hi > > Just after updating struts to 2.3.15.2, all of ours applications stop working. > Some of ours applications uses struts-convention-plugin, so only > url can be used to acces action's methods. > > We are using a lot of url with "!input" methods, especially to mana

About S2-019, is it safe to re-enable DMI ?

2013-09-25 Thread Eric Chatellier
Hi Just after updating struts to 2.3.15.2, all of ours applications stop working. Some of ours applications uses struts-convention-plugin, so only url can be used to acces action's methods. We are using a lot of url with "!input" methods, especially to manage form input and form validation. "S2-

Re: Translation of fieldName in annotated validations

2013-09-25 Thread Lukasz Lenart
2013/9/25 JOSE L MARTINEZ-AVIAL : > Hello, >I have an Action that receives a parameter *email *on a bean *event*. So > basically the parameter is send to the server with name "* > event.email=jlmagcgmail.com*"'. The bean and the parameter are created > correctly, so this part works ok. Now I wa

Re: file upload problem

2013-09-25 Thread Yaragalla Muralidhar
My problem got solved. thanks. *Thanks and Regards,* Muralidhar Yaragalla. * * On Wed, Sep 25, 2013 at 12:48 PM, Yaragalla Muralidhar < yaragallamur...@gmail.com> wrote: > I am not using struts tags in jsp page. if i dont use them will i not be > able to use struts upload interceptor. > > *Than

Re: file upload problem

2013-09-25 Thread Yaragalla Muralidhar
I am not using struts tags in jsp page. if i dont use them will i not be able to use struts upload interceptor. *Thanks and Regards,* Muralidhar Yaragalla. * * On Wed, Sep 25, 2013 at 12:43 PM, Yaragalla Muralidhar < yaragallamur...@gmail.com> wrote: > Hi i am using struts2. i am trying to uplo

file upload problem

2013-09-25 Thread Yaragalla Muralidhar
Hi i am using struts2. i am trying to upload a file and it is giving error. File load interceptor is configured by default or do we have to configure it manually? *Thanks and Regards,* Muralidhar Yaragalla. * *

Re: XWork injection intermittently skipped

2013-09-25 Thread Lukasz Lenart
2013/9/24 Savage, Patrick : >> How do you declare bean in struts.xml? As this is strange, if all injections >> are skipped, it must be something else. > > We don't actually declare the bean in struts.xml at all. Is that required in > order for @Inject to inject Struts objects into my bean? This has