RE: struts2 interceptor session timeout with ajax

2016-03-30 Thread Martin Gainty
MG>pls see below > From: lukaszlen...@apache.org > Date: Wed, 30 Mar 2016 07:59:28 +0200 > Subject: Re: struts2 interceptor session timeout with ajax > To: user@struts.apache.org > > I think you must use `onSuccessTopics` instead of `onErrorTopics` - > returning 403 does

Re: struts2 interceptor session timeout with ajax

2016-03-29 Thread Lukasz Lenart
if(status1 == 403 ) { > window.location.href = "/Sample/login.action"; > } > }); > > > > > > > > > > From: Lukasz Lenart > Sent: Friday, March 11, 201

Re: struts2 interceptor session timeout with ajax

2016-03-29 Thread fea jabi
t: Friday, March 11, 2016 2:21 PM To: Struts Users Mailing List Subject: Re: struts2 interceptor session timeout with ajax It won't work that way, when using Ajax you must use Ajax to redirect to a login page. You can use something like this http://cypressnorth.com/programming/global-ajax-e

Re: struts2 interceptor session timeout with ajax

2016-03-11 Thread Lukasz Lenart
It won't work that way, when using Ajax you must use Ajax to redirect to a login page. You can use something like this http://cypressnorth.com/programming/global-ajax-error-handling-with-jquery/ so your interceptor must return 403 status code (it can return also an url to login page to redirect t

Re: struts2 interceptor session timeout with ajax

2016-03-11 Thread fea jabi
Need help with this please. From: fea jabi Sent: Wednesday, March 9, 2016 10:51 AM To: user@struts.apache.org Subject: struts2 interceptor session timeout with ajax Have jquery tabbed panel in a jsp page which has a button to Save the form in the tabbed

Re: Struts2 Interceptor

2009-05-27 Thread Dale Newfield
Martin Gainty wrote: //action class not implements ShortCircuitableValidator public class MyAction extends ActionSupport implements ShortCircuitableValidator { OgnlValueStack vs = new OgnlValueStack(); In an Action when I need the value stack I don't construct a new one but instead get i

RE: Struts2 Interceptor

2009-05-27 Thread Martin Gainty
t n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 27 May 2009 11:25:47 -0400 > From: d...@newfield.org >

Re: Struts2 Interceptor

2009-05-27 Thread Chris Pratt
You can still use the Global Result, just set the global results value to an OGNL expression. This limits the places you can use the interceptor to actions that can fill the OGNL expression, but you could handle that with a common base class if you really want to go down this path. I don't think

Re: Struts2 Interceptor

2009-05-27 Thread Chris Pratt
Yes, you can, though I don't really thing it's the right way to go. Basically you use the body content of the tag to set the variable to the value of a scriplet expression like so: <%= myVar%> Again, there are much better ways of coding modern web applications that resorting to scriplets and I w

Re: Struts2 Interceptor

2009-05-27 Thread Stefano Corallo
Yes i know that, very appreciate this clarification :) -- Stefano Corallo On Wed, May 27, 2009 at 5:25 PM, Dale Newfield wrote: > Stefano Corallo wrote: > >> i think that this is the only one solution. Thanks guys for your reply. >> > > If you don't have a base class for all of your actions, y

Re: Struts2 Interceptor

2009-05-27 Thread Dale Newfield
Stefano Corallo wrote: i think that this is the only one solution. Thanks guys for your reply. If you don't have a base class for all of your actions, you might be able in the interceptor to get ahold of the ognl valueStack and set the value directly, then refer to #shortCircuitRedirectUrl (i

Re: Struts2 Interceptor

2009-05-27 Thread Stefano Corallo
Hi Dale, i think that this is the only one solution. Thanks guys for your reply. -- Stefano Corallo On Wed, May 27, 2009 at 4:59 PM, Dale Newfield wrote: > Stefano Corallo wrote: > >> I know the global result, but is unusefull for this purpose. The problem >> is >> that the actions that i wan

Re: Struts2 Interceptor

2009-05-27 Thread Dale Newfield
Stefano Corallo wrote: I know the global result, but is unusefull for this purpose. The problem is that the actions that i want to call is knew at runtime cause the interceptor at init time scan classes with certain annotations and i want to forward to those actions so i can't put the result in s

RE: Struts2 Interceptor

2009-05-27 Thread Martin Gainty
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: st...@sjlt.co.uk > To: user@struts.apache.org > Subject: RE: Struts2 Interceptor > Date: Wed, 27 May 2009 10:47:42 +0100 > > Hi Stefano, > > This looks l

RE: Struts2 Interceptor

2009-05-27 Thread Steve
Hi Stefano, This looks like an awkward design as you would go through half the interceptor stack expecting to call one action, and half the stack expecting to call a second action. As an alternative could you do something like the following:- Create class (or Interface) ReceivingAction with sub

Re: Struts2 Interceptor

2009-05-27 Thread Stefano Corallo
Hi Criss, thanks for your reply. I know the global result, but is unusefull for this purpose. The problem is that the actions that i want to call is knew at runtime cause the interceptor at init time scan classes with certain annotations and i want to forward to those actions so i can't put the re

RE: Struts2 Interceptor

2009-05-27 Thread Qunhuan Mei
Hello David and Chris, Thank you two very much indeed for your help. I have tried tag with different scope and seems I can set a parameter to any value I want, but I can’t set it to the value/variable from jsp’s java code block, so I suppose may not be applicable to my requirement. (or I must

Re: Struts2 Interceptor

2009-05-27 Thread Chris Pratt
Sort of. The way that I've achieved something similar to what you seem to be asking is to define a bunch of Global Results in struts.xml that define common actions that the interceptors may need to invoke (like reset-password or invalid-input), then instead of chaining to the action in the interce

Re: Struts2 interceptor with JTA in Sprign

2009-02-16 Thread Wes Wannemacher
On Monday 16 February 2009 05:15:49 Torsten Krah wrote: > Am Samstag, 14. Februar 2009 17:11:55 schrieb Frans Thamura: > > i try use the non interceptor version, work well, but i find the > > interceptor cannot work with JTA related injection > > Why? > I am using S2 and Spring with JTA managed tra

Re: Struts2 interceptor with JTA in Sprign

2009-02-16 Thread Torsten Krah
Am Samstag, 14. Februar 2009 17:11:55 schrieb Frans Thamura: > i try use the non interceptor version, work well, but i find the > interceptor cannot work with JTA related injection Why? I am using S2 and Spring with JTA managed transaction too here and it works fine (if spring is the object facto

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Randy Burgess
Don't validation errors go to input? Like so: /pages/error.jsp /pages/welcome-input.jsp /pages/welcome.jsp I put the annotations on the setters. @RequiredStringValidator(type = ValidatorType.FIELD, message = "You must enter a p

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread xianwinwin
AND THE WINNER IS: xniit2003 YES!! thank you so much! good call and a brilliant observation thank you all! you wrote: I guess your problem is in the xml file. You are using "error" result type. But by default if validation error occurs, "input" string is being returned. So please use "inp

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Ian Roughley
I didn't see an INPUT result configured, which will be needed. /Ian -- Ian Roughley From Down & Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Dave Newton wrote: Please post the entire relevant code and confi

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Arpan Debroy
I guess your problem is in the xml file. You are using "error" result type. But by default if validation error occurs, "input" string is being returned. So please use "input" instead of "error" and check again. Thanks On Jan 4, 2008 5:07 AM, xianwinwin <[EMAIL PROTECTED]> wrote: > > I've been st

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Dave Newton
Please post the entire relevant code and configuration. I do this all the time (annotating the getter, though, as Wes said) and don't have any problems. You're extending ActionSupport? d. --- xianwinwin <[EMAIL PROTECTED]> wrote: > > thanks wes, I tried this manipulation - didnt work > :-( > >

Re: struts2: interceptor - validation doesn't work :-(

2008-01-03 Thread xianwinwin
thanks wes, I tried this manipulation - didnt work :-( Wes Wannemacher wrote: > > Try annotating the getter rather than the setter. > > -Wes > > On 1/3/08, xianwinwin <[EMAIL PROTECTED]> wrote: >> >> yes i did :super: >> >> >> >> newton.dave wrote: >> > >> > Did you annotate the class with t

Re: struts2: interceptor - validation doesn't work :-(

2008-01-03 Thread Wes Wannemacher
Try annotating the getter rather than the setter. -Wes On 1/3/08, xianwinwin <[EMAIL PROTECTED]> wrote: > > yes i did :super: > > > > newton.dave wrote: > > > > Did you annotate the class with the @Validation() annotation? > > > > d. > > > > --- xianwinwin <[EMAIL PROTECTED]> wrote: > > > >> > >>

Re: struts2: interceptor - validation doesn't work :-(

2008-01-03 Thread xianwinwin
yes i did :super: newton.dave wrote: > > Did you annotate the class with the @Validation() annotation? > > d. > > --- xianwinwin <[EMAIL PROTECTED]> wrote: > >> >> I've been struggling with this issue for a while and any pointer would be >> appreciated. >> >> I have a simple file with one

Re: struts2: interceptor - validation doesn't work :-(

2008-01-03 Thread Dave Newton
Did you annotate the class with the @Validation() annotation? d. --- xianwinwin <[EMAIL PROTECTED]> wrote: > > I've been struggling with this issue for a while and any pointer would be > appreciated. > > I have a simple file with one field -name; I would like to validate that > the > user put