Re: Placing interceptor in arbitrary position in the stack

2023-03-23 Thread Lukasz Lenart
As far I know you must declare a new stack czw., 23 mar 2023 o 18:29 Shawn Griffith <276ee31...@proton.me.invalid> napisał(a): > > Hi, > > let's say I have this default interceptor stack > > > > > > > > > > > > > > > >

Placing interceptor in arbitrary position in the stack

2023-03-23 Thread Shawn Griffith
Hi, let's say I have this default interceptor stack input,back,cancel,browse input,back,cancel,browse using annotations on an action class, can I place another interceptor between prepare and model driven? Or do I need to re-declare the entire stack wit

Re: When using the ExecuteAndWait interceptor, is it possible to avoid calling prepare / validate methods on reloads?

2021-10-11 Thread Lukasz Lenart
pon., 11 paź 2021 o 16:26 Burton Rhodes napisał(a): > Thanks for the reply Lukasz. I thought about doing something like that, > but this page > https://struts.apache.org/core-developers/execute-and-wait-interceptor.html > mentions the ExecuteAndWait interceptor must be at the end

Re: When using the ExecuteAndWait interceptor, is it possible to avoid calling prepare / validate methods on reloads?

2021-10-11 Thread Burton Rhodes
Thanks for the reply Lukasz. I thought about doing something like that, but this page https://struts.apache.org/core-developers/execute-and-wait-interceptor.html mentions the ExecuteAndWait interceptor must be at the end of the stack. I guess you're saying that is not always the case. I&#x

Re: When using the ExecuteAndWait interceptor, is it possible to avoid calling prepare / validate methods on reloads?

2021-10-10 Thread Lukasz Lenart
Struts > would immediately identify the "waiting" Action, and if it wasn't finished, > it would return a WAIT result with the running Action at the top of the > stack. I now realize since the ExecuteAndWait filter is at the end of the > interceptor stack, it obviously does

When using the ExecuteAndWait interceptor, is it possible to avoid calling prepare / validate methods on reloads?

2021-10-07 Thread Burton Rhodes
wasn't finished, it would return a WAIT result with the running Action at the top of the stack. I now realize since the ExecuteAndWait filter is at the end of the interceptor stack, it obviously doesn't send the WAIT result until all interceptors have been executed. That said, in

Re: URI too long error when using ExecuteAndWait interceptor

2020-11-30 Thread Lukasz Lenart
s a form via POST and uses the ExecuteAndWait > > interceptor. On the "wait" jsp I have: > > > > "/> > > > > However, the includeParams "all" is including all the POST form variables > > (which there are many), and as a result, I am gettin

Re: URI too long error when using ExecuteAndWait interceptor

2020-11-21 Thread Burton Rhodes
I ended up replacing the tag refresh method with javascript that parses the "url" variable and recreates a element on the fly to submit via POST. On Fri, Nov 20, 2020 at 4:19 PM Burton Rhodes wrote: > I have a page that submits a form via POST and uses the ExecuteAndWait >

URI too long error when using ExecuteAndWait interceptor

2020-11-20 Thread Burton Rhodes
I have a page that submits a form via POST and uses the ExecuteAndWait interceptor. On the "wait" jsp I have: "/> However, the includeParams "all" is including all the POST form variables (which there are many), and as a result, I am getting a "URI too long&

Re: i18n Interceptor cookie

2019-02-20 Thread Lukasz Lenart
śr., 20 lut 2019 o 13:21 Rita Brito napisał(a): > I am defining an i18n interceptor with name="localeStorage">cookie so that a cookie with the user's > selected language is stored. > > Everything is working fine if when I navigate in my domain (eg: > my.domai

i18n Interceptor cookie

2019-02-20 Thread Rita Brito
Hi, I am defining an i18n interceptor with name="localeStorage">cookie so that a cookie with the user's selected language is stored. Everything is working fine if when I navigate in my domain (eg: my.domain.com/somepage.html). However, when navigating to a subdomain (

Re: default interceptor overriding parent package default interceptor

2018-12-17 Thread Steven Yang
t; > ...no interceptors defined, using interceptors form defaultPackage > > > > in cus-cus.xml > > > > > > > > > > new interceptors > > > > > > > > > > > > But all now all

Re: default interceptor overriding parent package default interceptor

2018-12-17 Thread Lukasz Lenart
ruts2 xml. > > in cus.xml > > > ...no interceptors defined, using interceptors form defaultPackage > > in cus-cus.xml > > > > > new interceptors > > > > > > But all now all the Actions defined in cu

RE: default interceptor overriding parent package default interceptor

2018-12-15 Thread Yasser Zamani
Hi Steven, We have similar config at showcase [1]. I putted a breakpoint at [2]. It works as expected i.e. for "index" action it hits break point as not a first interceptor but for "skill/save" action it hits it as the first interceptor. Does issue persist with latest

default interceptor overriding parent package default interceptor

2018-12-12 Thread Steven Yang
default interceptor. I only want the Actions defined in cus-cus.xml to use the newInterceptorStack as the default interceptor. Using Struts 2.3.x Please advice Thanks

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-21 Thread Yasser Zamani
On 4/21/2018 3:05 PM, Martin Gainty wrote: > i could'nt find it in servlet-api spec? > > https://tomcat.apache.org/tomcat-8.0-doc/servletapi/javax/servlet/http/HttpServletResponse.html > > HttpServletResponse (Servlet 3.1 API Documentation > ...

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-21 Thread Martin Gainty
e.org Subject: Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh? On 4/18/2018 1:21 AM, Martin Gainty wrote: > MG>AFAIK a redirect terminates the old session and creates a new session I think redirect to same domain:ip in same browser tab page should

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-18 Thread Yasser Zamani
On 4/18/2018 5:27 PM, Martin Gainty wrote: > MG2>some confusion on where session is accessed > * available. This is because actions are built on a single-thread model. The > * only way to pass data is through the session > MG2>with chain interceptor No it didn't mean

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-18 Thread Martin Gainty
MG2>some confusion on where session is accessed From: Yasser Zamani on behalf of Yasser Zamani Sent: Wednesday, April 18, 2018 2:57 AM To: user@struts.apache.org Subject: Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Yasser Zamani
On 4/18/2018 1:21 AM, Martin Gainty wrote: > MG>AFAIK a redirect terminates the old session and creates a new session I think redirect to same domain:ip in same browser tab page should keep session. > MG>a better alternative is to implement ChainingInterceptor with type="chain"> e.g. As Strut

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Martin Gainty
From: Burton Rhodes Sent: Tuesday, April 17, 2018 7:23 AM To: Struts Users Mailing List Subject: Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh? That's a great thought. I think the session method makes more sense. O

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Yasser Zamani
On 4/17/2018 3:53 PM, Burton Rhodes wrote: > That's a great thought. I think the session method makes more sense. Glad to hear :) thanks! I would like to add that you also can delete ExecAndWait interceptor. Then just save posted data in db and immediately send a thank you message to y

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Burton Rhodes
ing s:url)? Because then you can use content="3;url="/> which only counts GET > params i.e. only query string which doesn't include email body but > includes other validation needed fields. > > But if I were you, I prefer to use two actions for such requirement. >

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-17 Thread Yasser Zamani
if I were you, I prefer to use two actions for such requirement. action1 which doesn't have ExecAndWait interceptor but has others like validation, gets form data and stores them as a single object inside session with a unique key every-time i.e. a GUID. Then action1 redirects to action

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-16 Thread Burton Rhodes
Monday, April 16, 2018, Yasser Zamani wrote: > > > On 4/15/2018 11:39 PM, Burton Rhodes wrote: > > I have been getting "Bad Request" or "URL too long" errors on occasion > for > > an email form that uses the execute and wait interceptor. I am using the >

Re: [S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-16 Thread Yasser Zamani
On 4/15/2018 11:39 PM, Burton Rhodes wrote: > I have been getting "Bad Request" or "URL too long" errors on occasion for > an email form that uses the execute and wait interceptor. I am using the > to resubmit the form per the documentation. > > "/>

[S2] ExecuteAndWait Interceptor // Only re-submit token parameters on refresh?

2018-04-15 Thread Burton Rhodes
I have been getting "Bad Request" or "URL too long" errors on occasion for an email form that uses the execute and wait interceptor. I am using the to resubmit the form per the documentation. "/> However, the original form submits via POST and the meta tag use

RE: Conversion Error Interceptor prevent errors for empty values

2018-02-15 Thread Paul Zepernick
Yasser, Thanks for pointing me to the right class. After debugging, I found the problem was in my template and it was including the option body in the value when trying to set it to empty. There is no issue with the Interceptor and it is working as documented. Thanks for your help. Paul R

Re: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Yasser Zamani
or` method and see what happens when you post auditForm.incorrectAuditReason.id? > I have attempted to override the default interceptor by adding this in my > package and overriding the shouldAddError(), but it continues to call the > default Struts ConversionErrorInterceptor.

RE: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Paul Zepernick
Interceptor prevent errors for empty values Yes, I have it happening on 2.5.14.1. I have a select box pointing at a Integer like this: auditForm.incorrectAuditReason.id I am using the rest plugin which is including it in the stack. I have attached the source from Maven. Where is the check

RE: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Paul Zepernick
shouldAddError() always returning true. I have attempted to override the default interceptor by adding this in my package and overriding the shouldAddError(), but it continues to call the default Struts ConversionErrorInterceptor. Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit

Re: Conversion Error Interceptor prevent errors for empty values

2018-02-14 Thread Yasser Zamani
On 2/13/2018 8:06 PM, Paul Zepernick wrote: > Can someone provide some clarification on if this interceptor should be > adding a field error when an empty string is passed to a Integer in the > action? No, it should not be happening for `conversionError` interceptor. Does it happen?

Conversion Error Interceptor prevent errors for empty values

2018-02-13 Thread Paul Zepernick
Can someone provide some clarification on if this interceptor should be adding a field error when an empty string is passed to a Integer in the action? I am trying to prevent the field error from happening in this case. It looks like it should not be happening according to the docs: https

Re: Interceptor implementing SessionAware interface

2017-12-03 Thread Yasser Zamani
are) { ((SessionAware) action).setSession(context.getSession()); } I think you can rewrite your interceptor as below instead (like ServletConfigInterceptor): public class SessionInterceptor extends AbstractInterceptor { SessionMap session; @Override public String interc

Interceptor implementing SessionAware interface

2017-12-03 Thread saravana2...@gmail.com
Hi, I am trying to create custom interceptor which implements SessionAware interface to handle session management logic so that cross-cutting concern is not implemented Action class which is concentrating on core concern. setSession() method is not called even after implementing sessionAware and

Re: Setting interceptor param on package level

2017-07-31 Thread Lukasz Lenart
2017-07-29 10:26 GMT+02:00 Norbert Harrer : > Hi. > > A question just out of curiosity. Is it possible to set an interceptor > parameter on the package level. > > For example I have a couple interceptor stacks more or less like this: > > > > > >

Setting interceptor param on package level

2017-07-29 Thread Norbert Harrer
Hi. A question just out of curiosity. Is it possible to set an interceptor parameter on the package level. For example I have a couple interceptor stacks more or less like this: true ERROR I want the Parameters for the

Re: S2 String Trim Interceptor?

2017-04-23 Thread Lukasz Lenart
2017-04-21 15:53 GMT+02:00 Burton Rhodes : > Since the invocation.getInvocationContext().getParameters().toMap() method > is now deprecated, how would I refactor my String Trim interceptor to trim > incoming parameters? The HttpParameters parameter objects are designed to > be "

S2 String Trim Interceptor?

2017-04-21 Thread Burton Rhodes
Since the invocation.getInvocationContext().getParameters().toMap() method is now deprecated, how would I refactor my String Trim interceptor to trim incoming parameters? The HttpParameters parameter objects are designed to be "immutable". Some posts online have suggested type conve

Re: What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-04-06 Thread Christoph Nenning
ters(). > > > > > The struts method you mentioned just forwards to according method of > > > > > servlet api. > > > > > > > > > > Your json data can only be read by consuming request inputstream. If > > > you

Re: What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-03-26 Thread Snowball RC
; > content-type " > > > > application/x-www-form-urlencoded" are made available via > > getParameters(). > > > > The struts method you mentioned just forwards to according method of > > > > servlet api. > > > > > > > >

Re: Passing a parameter from an interceptor to an action

2017-03-26 Thread Lukasz Lenart
2017-03-26 18:23 GMT+02:00 Heikki Hyyrö : > Hi, > > I would like to pass a parameter from an interceptor to an action, but am > not sure what is a proper way to do it if I also want to ensure that a > parameter with the same name cannot be injected into the action as a request >

Passing a parameter from an interceptor to an action

2017-03-26 Thread Heikki Hyyrö
Hi, I would like to pass a parameter from an interceptor to an action, but am not sure what is a proper way to do it if I also want to ensure that a parameter with the same name cannot be injected into the action as a request parameter. I have set the interceptor to add the parameter into

Re: What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-03-23 Thread Snowball RC
t; getParameters(). > > > The struts method you mentioned just forwards to according method of > > > servlet api. > > > > > > Your json data can only be read by consuming request inputstream. If > you > > > do so in your interceptor it is

Re: What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-03-23 Thread Christoph Nenning
hod of > > servlet api. > > > > Your json data can only be read by consuming request inputstream. If you > > do so in your interceptor it is not available anymore to your actions (or > > struts json interceptor) so you must rewrite them, too. > > > > Reg

Re: What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-03-23 Thread Snowball RC
ds to according method of > servlet api. > > Your json data can only be read by consuming request inputstream. If you > do so in your interceptor it is not available anymore to your actions (or > struts json interceptor) so you must rewrite them, too. > > Regards, > C

Re: What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-03-23 Thread Christoph Nenning
ng request inputstream. If you do so in your interceptor it is not available anymore to your actions (or struts json interceptor) so you must rewrite them, too. Regards, Christoph > From: "Snowball RC" > To: , > Date: 23.03.2017 11:28 > Subject: What is the best way

What is the best way to get all JSON params in custom Interceptor to log them all in a custom logger ?

2017-03-23 Thread Snowball RC
Hi, I am trying to implement a custom Interceptor to have a global custom "security" logger in my web app. The target is to log all the datas sended to the server during update, save, delete etc... to have a custom logger for security reasons. In case of GET and POST (query strin

Re: I18N Interceptor Change

2016-08-16 Thread Johannes Geppert
uys, > > > > We have an old project which has been happily working for years. Recently > we updated it to 2.5.x which was surprisingly easy. > > > > One issue we did run into which was quite annoying was the I18N > Interceptor now validates locales against the list of de

I18N Interceptor Change

2016-08-16 Thread Zoran Avtarovski
HI Guys, We have an old project which has been happily working for years. Recently we updated it to 2.5.x which was surprisingly easy. One issue we did run into which was quite annoying was the I18N Interceptor now validates locales against the list of default available locales in this

Re: Passing Query String to Action through Interceptor

2016-05-23 Thread Nick Broadhurst
Wow! I am embarrassed I did not know that and had not come across it yet. Of course it resolved the issue. Thank you very much, Nick On Mon, May 23, 2016 at 1:39 AM, Lukasz Lenart wrote: > 2016-05-23 3:01 GMT+02:00 Nick Broadhurst : > > Hello, > > > > I have an interc

Re: Passing Query String to Action through Interceptor

2016-05-22 Thread Lukasz Lenart
2016-05-23 3:01 GMT+02:00 Nick Broadhurst : > Hello, > > I have an interceptor that is working fine except the query string is not > being passed on to the action from the interceptor. > > > This will overwrite defined default stack - you can create a custom s

Passing Query String to Action through Interceptor

2016-05-22 Thread Nick Broadhurst
Hello, I have an interceptor that is working fine except the query string is not being passed on to the action from the interceptor. iro/IroCaseFORM.jsp URL: http:///EditIroCase.action?id=123 Action is an existing one that I am adding the interceptor to

RE: Token Interceptor between Struts1 and Sturts2

2016-04-13 Thread Dhandapani, Rajeswaran
: Tuesday, April 12, 2016 1:31 PM To: Struts Users Mailing List Subject: Re: Token Interceptor between Struts1 and Sturts2 > Hi, > > We have a form in JSP rendered by Struts1 action class. > > But the form is submitted to the Struts2 action class which is > configured with Struts2

Re: Token Interceptor between Struts1 and Sturts2

2016-04-12 Thread Christoph Nenning
> Hi, > > We have a form in JSP rendered by Struts1 action class. > > But the form is submitted to the Struts2 action class which is > configured with Struts2 Token Interceptor. > > Is there any way to generate a struts2 token inside struts1 JSP file? > > Th

Token Interceptor between Struts1 and Sturts2

2016-04-11 Thread Dhandapani, Rajeswaran
Hi, We have a form in JSP rendered by Struts1 action class. But the form is submitted to the Struts2 action class which is configured with Struts2 Token Interceptor. Is there any way to generate a struts2 token inside struts1 JSP file? Thanks & Regards, Rajeswar

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 red

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

struts2 interceptor session timeout with ajax

2016-03-09 Thread fea jabi
Have jquery tabbed panel in a jsp page which has a button to Save the form in the tabbed panel which is making an ajax call and is working fine. Now trying to implement the session management for all requests in the application and imlemented the new interceptor to perform the same. Having

Re: S2: How to tell if a response has been committed from an interceptor?

2016-01-07 Thread Christoph Nenning
> Inside an Interceptor I'm getting an exception > > java.lang.IllegalStateException: Cannot create a session after the response > has been committed > I have access to the ActionInvocation as this is passed into doIntercept() > public String doIntercept(ActionInvoca

Re: S2: How to tell if a response has been committed from an interceptor?

2016-01-06 Thread Ken McWilliams
a session" isn't a good message because you shouldn't be trying to create a session at all! It's part of the containers responsibility to do that. You just ask for it. So the real cause of the issue might be something else. On Wed, Jan 6, 2016 at 11:41 AM, Greg Lindholm wrote

S2: How to tell if a response has been committed from an interceptor?

2016-01-06 Thread Greg Lindholm
Inside an Interceptor I'm getting an exception java.lang.IllegalStateException: Cannot create a session after the response has been committed I have access to the ActionInvocation as this is passed into doIntercept() public String doIntercept(ActionInvocation invocation) throws Exceptio

Re: Obtain the ServletContext in Interceptor init method

2015-11-22 Thread Lukasz Lenart
2015-11-20 23:01 GMT+01:00 Christopher Schultz : > Is it possible to get the ServletContext from an Interceptor's init() > method? I'd like to use it for some one-time initialization rather than > grabbing it during the interceptor's intercept() method and either > attempt one-time initialization o

Obtain the ServletContext in Interceptor init method

2015-11-20 Thread Christopher Schultz
All, Is it possible to get the ServletContext from an Interceptor's init() method? I'd like to use it for some one-time initialization rather than grabbing it during the interceptor's intercept() method and either attempt one-time initialization or repeated-initialization. Thanks, -chris ---

Re: How to add a global interceptor

2015-10-13 Thread Jasper Rosenberg
No need for pity :)  It really hasn't really much maintenance overhead to this point.  Needing to do a change to all stacks is really the only case where I've seen it be problem.  Still, we have been pretty conservative in trying to keep our interceptor stacks thin.  It is probably

Re: How to add a global interceptor

2015-10-13 Thread Christoph Nenning
> From: Jasper Rosenberg > To: Struts Users Mailing List , > Date: 13.10.2015 14:01 > Subject: Re: How to add a global interceptor > > Thanks for the feedback! > To be clear, we do have a number of interceptor stacks that are > shared and we follow a similar pattern to

Re: How to add a global interceptor

2015-10-13 Thread Jasper Rosenberg
Thanks for the feedback! To be clear, we do have a number of interceptor stacks that are shared and we follow a similar pattern to what you describe where we add additional interceptors where needed before or after a common stack.  There are places that we might be able to reduce even that

Re: How to add a global interceptor

2015-10-13 Thread Christoph Nenning
> From: Jasper Rosenberg > To: "user@struts.apache.org" , > Date: 13.10.2015 13:26 > Subject: How to add a global interceptor > > Hi, > > > > I work on a project with hundreds of struts actions manywith their > own custom interceptor stac

How to add a global interceptor

2015-10-13 Thread Jasper Rosenberg
Hi,   I work on a project with hundreds of struts actions manywith their own custom interceptor stacks specified.    We have recently internationalized the site, and so I had aneed to add an i18n interceptor to the top of every action stack.  It would have been impractical (and difficultto

Re: Unable to change content-type with Interceptor?

2015-07-26 Thread Lukasz Lenart
2015-07-23 23:18 GMT+02:00 JOSE L MARTINEZ-AVIAL : > Hello all, >I was just looking for this option to override the content-type of the > json result. Is there any fix for this? Not sure what I have been referring to but JsonResult has contentType param defined https://github.com/apache/struts

Re: Unable to change content-type with Interceptor?

2015-07-23 Thread JOSE L MARTINEZ-AVIAL
Hello all, I was just looking for this option to override the content-type of the json result. Is there any fix for this? Thanks JL 2012-12-31 12:41 GMT-05:00 Lukasz Lenart : > 2012/12/30 Burton Rhodes : > > Lukasz - > > > > Thanks for all your help. You got me on the right track and it a

Re: Change Action Method In Interceptor

2015-03-11 Thread Lukasz Lenart
2015-03-11 16:29 GMT+01:00 R Veach : > Hi, > > I know it is possible to limit struts to specific methods using the > MethodFilterInterceptor, and to change the execute method in the config or > form declaration using the method attribute. > > Is it possible to have an int

Change Action Method In Interceptor

2015-03-11 Thread R Veach
Hi, I know it is possible to limit struts to specific methods using the MethodFilterInterceptor, and to change the execute method in the config or form declaration using the method attribute. Is it possible to have an interceptor change which method would be executed in the action? I see I can

Re: Call a forward or a redirect inside an interceptor.

2015-03-09 Thread ersinghlovepr...@gmail.com
; } But in case of Interceptor getter setter is not working so You can just set the value in stack like: invocation.getStack().set("url", "actionUrl"); and just return a "redirect" from interceptor instead of invocation.invoke() BUT BE CAREFUL THIS WILL NOT LET ANY

Adding custom interceptor in struts2 rest project

2015-01-28 Thread Amol Ghotankar
Hi All, I was trying to get more deep in struts2 rest plugin. To better understand things I have created a struts2-rest-sample on github https://github.com/amolghotankar/struts2-rest-sample Issues I see here are 1. If we add a customer interceptor then index action is not getting called. 2

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-22 Thread Lukasz Lenart
2015-01-17 5:11 GMT+01:00 Tenchi Masaki : > Hi Lukasz, > > Thank you very much for your attention, it's really nice to have detailed > examples in the docs. > But unfortunately it's still not working for me. I've followed the example > exactly as the docs, but all the properties from SomeAction are

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-16 Thread Tenchi Masaki
n't work. > > Yes as you must define "includes" for the result action (it strange > for me too and sorry for misleading you ... but it makes sense :) ) > > > I've tried this too and no success (actually it doesn't make sense at > all, > > so it's good that it does not w

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-14 Thread Lukasz Lenart
sense :) ) > I've tried this too and no success (actually it doesn't make sense at all, > so it's good that it does not work.. lol): > > > > prop1 "basicStack" doesn't include "chain" interceptor, it

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-12 Thread Tenchi Masaki
Yes, at first I thought that I was supposed to pass the "includes" param into the "chain" result like this: otherAction prop1 /result.jsp But it doesn't work. I've tried this too and no success (actually it doesn't m

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-07 Thread Lukasz Lenart
2015-01-07 20:46 GMT+01:00 Tenchi Masaki : > Hi Lukasz, > > I've tried setting up a new project just to test the chained action and now > I'm a bit confused. It's exactly the same configuration on struts.xml: > > > Can you move the props config here? As you want pass only few props of someAc

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-07 Thread Tenchi Masaki
Hi Lukasz, I've tried setting up a new project just to test the chained action and now I'm a bit confused. It's exactly the same configuration on struts.xml: otherAction prop1,prop2,prop3 good_result.ftl but now I noticed that all the parameters from "Some

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-06 Thread Lukasz Lenart
2015-01-06 3:47 GMT+01:00 Tenchi Masaki : > Hi, > > I'm trying to configure a list of parameters to be passed into a chained > action, but I can't make it work. I've tried the following configuration in > my struts.xml: > > > > otherAction > > > > prop1,prop2,prop3 Can you

How to setup includes/excludes in Chaining Interceptor

2015-01-05 Thread Tenchi Masaki
at prop1, prop2, prop3 would be copied into "otherAction", but none of the "someAction" properties are being copied. I've tried the other way around setting the excludes instead, but didn't work either. What's the correct syntax to setup the includes/excludes para

Re: Rppe: What is the effect of Params Interceptor?

2014-09-23 Thread Manoj . Sharma
Dear Vineesh, The params interceptor also known as parameters interceptor is used to set all parameters on the valuestack.It is found in the default stack bydefault. So you don't need to specify it explicitely. It gets all parameters by calling the getParameters() method of ActionContex

Rppe: What is the effect of Params Interceptor?

2014-09-23 Thread Vineesh Anand
On Nov 25, 2012 4:37 PM, "Wu Ming" wrote: > I read this tutorial< > http://www.tutorialspoint.com/struts_2/struts_interceptors.htm>, > but I don't understand what Params Interceptor is used for? > > Example: > > > > result.jsp > >

Re: paramsPrepareParamsStack and token interceptor

2014-08-21 Thread Lukasz Lenart
n' with value >>> ['5UVO47K811DQ15DUZF4QV2NQ8DHIHSUY', ] >>> >>> At least one I got rid of by excluding these params (important is >>> 'token'): >>> >>> @InterceptorRefs({@InterceptorRef(value = "paramsPreparePara

Re: paramsPrepareParamsStack and token interceptor

2014-08-21 Thread Fabian Richter
aramsStack", params = {"params.excludeParams", "struts.token,struts.token.name,token"})}) But apparently only the first params interceptor in the stack uses these params. The second one (the one after the prepare interceptor) only uses the built-in excludeParams. So

Re: paramsPrepareParamsStack and token interceptor

2014-08-20 Thread Lukasz Lenart
amsStack", params > = {"params.excludeParams", > "struts.token,struts.token.name,token"})}) > > But apparently only the first params interceptor in the stack uses these > params. The second one (the one after the prepare interceptor) only uses the > built-in e

paramsPrepareParamsStack and token interceptor

2014-08-19 Thread Fabian Richter
UVO47K811DQ15DUZF4QV2NQ8DHIHSUY', ] At least one I got rid of by excluding these params (important is 'token'): @InterceptorRefs({@InterceptorRef(value = "paramsPrepareParamsStack", params = {"params.excludeParams", "struts.token,struts.token.name,toke

Re: dynamic interceptor insertion

2014-06-26 Thread Paul Benedict
> I would like to dynamically insert an interceptor to a specific place > in existing stack. > Of course I also like the stacks referencing the one where I insert > the interceptor also take advantage of this configuration change. > > Practicable to do this? I started to look on the side

dynamic interceptor insertion

2014-06-26 Thread Gildas de Cadoudal
Hi all, I would like to dynamically insert an interceptor to a specific place in existing stack. Of course I also like the stacks referencing the one where I insert the interceptor also take advantage of this configuration change. Practicable to do this? I started to look on the side of

Re: Find action method in interceptor ( One action class with lots of action methods in it)

2014-06-11 Thread Christoph Nenning
> Please consider below action class: > > public class MyAction extends ActionSupport{ > > @Action("action1") > public String action1(){ > > } > > @Action("action2") >public String action2(){ > } > > @Action("action3") >

Re: Find action method in interceptor ( One action class with lots of action methods in it)

2014-06-07 Thread Antonios Gkogkakis
Hi Alireza, I believe you can have the method name of the executed action like this actionInvocation.getProxy().getMethod() Antonios On 7 June 2014 06:29, Alireza Fattahi wrote: > Please consider below action class: > > public class MyAction extends ActionSupport{ > > @Action("actio

Find action method in interceptor ( One action class with lots of action methods in it)

2014-06-06 Thread Alireza Fattahi
Please consider below action class:  public class MyAction extends ActionSupport{            @Action("action1")       public String action1(){           }                @Action("action2")        public String action2(){             }       @Action("action3")       public String action3(){    

Re: S2 how to determine if a session exists from an Interceptor

2014-02-06 Thread Lukasz Lenart
http://struts.apache.org/release/2.3.x/docs/create-session-interceptor.html 2014-02-06 19:42 GMT+01:00 Dave Newton : > There's the session interceptor. It's unusual that you'd execute an action > and not have a session, though, since JSP pages will create their own if >

Re: S2 how to determine if a session exists from an Interceptor

2014-02-06 Thread Dave Newton
There's the session interceptor. It's unusual that you'd execute an action and not have a session, though, since JSP pages will create their own if one doesn't exist and it (the JSP) isn't explicitly configured not to create one. On Thu, Feb 6, 2014 at 1:33 PM, G

Re: S2 how to determine if a session exists from an Interceptor

2014-02-06 Thread Greg Lindholm
My Interceptor is expecting a session to exist, but I'm occasionally getting exceptions that say the session doesn't exist, and since this occurs after the action has executed and response has been committed it is too late to create a session. So my question is; From with an Intercepto

  1   2   3   4   5   6   7   8   9   10   >