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 > > > > > > > > > > > > > > > > &g

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

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'll give

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

2021-10-11 Thread Lukasz Lenart
ts > 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 doesn't send t

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

2021-10-07 Thread Burton Rhodes
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 some of my

Re: URI too long error when using ExecuteAndWait interceptor

2020-11-30 Thread Lukasz Lenart
orm 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

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.domain.com

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 (eg:

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

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
as the 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
day, April 18, 2018 2:57 AM To: user@struts.apache.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

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 <yasser.zam...@live.com> on behalf of Yasser Zamani <yasserzam...@apache.org> Sent: Wednesday, April 18, 2018 2:57 AM To: user@struts.apache.org Subject: Re: [S2] ExecuteAndW

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

2018-04-18 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

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

2018-04-17 Thread Martin Gainty
From: Burton Rhodes <burtonrho...@gmail.com> 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

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 your u

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

2018-04-17 Thread Burton Rhodes
ing inside action url > using 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

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

2018-04-17 Thread Yasser Zamani
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 action2 and also p

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

2018-04-16 Thread Burton Rhodes
On Monday, April 16, 2018, Yasser Zamani <yasserzam...@apache.org> 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

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

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
ethod 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
for 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<String, Object> session; @Override

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

Re: Setting interceptor param on package level

2017-07-31 Thread Lukasz Lenart
2017-07-29 10:26 GMT+02:00 Norbert Harrer <nhar...@gmx.at>: > 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: > > > &g

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

Re: S2 String Trim Interceptor?

2017-04-24 Thread Lukasz Lenart
2017-04-21 15:53 GMT+02:00 Burton Rhodes <burtonrho...@gmail.com>: > 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 objec

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

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
ameters(). > > > > > 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-27 Thread Snowball RC
ards 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 > >

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ö <heikki.hy...@uta.fi>: > 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 th

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

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
> application/x-www-form-urlencoded" are made available via > getParameters(). > > > The struts method you mentioned just forwards to according method of > > > servlet api. > > > > > > Your json data can only be read by consuming r

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
d 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 not available anymore to your actions (or > > struts json interceptor) so you mu

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
truts 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 not available anymore to your actions (or > struts json interceptor) so you must rewrite them, to

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" <craf@gmail.com> > To: <user@struts.apache.org>, > Date: 23.

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 st

Re: I18N Interceptor Change

2016-08-16 Thread Johannes Geppert
;zo...@sparecreative.com>: > 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 valida

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

Re: Passing Query String to Action through Interceptor

2016-05-23 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. > > > > > > > > This will overwrite defined default stack - you

Re: Passing Query String to Action through Interceptor

2016-05-23 Thread Lukasz Lenart
2016-05-23 3:01 GMT+02:00 Nick Broadhurst <hou1...@gmail.com>: > 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 - yo

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

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 d

Re: struts2 interceptor session timeout with ajax

2016-03-30 Thread Lukasz Lenart
) { > alert('in error'); > var status1 = event.status; > > if(status1 == 403 ) { > window.location.href = "/Sample/login.action"; > } > }); > > > > > > > > > > From: Lukasz Lenart <lukaszlen...@apache.org> > Sent:

Re: struts2 interceptor session timeout with ajax

2016-03-29 Thread fea jabi
che.org> Sent: 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-aja

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

Re: struts2 interceptor session timeout with ajax

2016-03-11 Thread fea jabi
Need help with this please. From: fea jabi <zy...@hotmail.com> 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 t

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(ActionInvocation

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 Exception My

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

2016-01-06 Thread Ken McWilliams
il.com> wrote: > 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 i

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 >

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

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: How to add a global interceptor

2015-10-13 Thread Christoph Nenning
> From: Jasper Rosenberg <jasper_rosenb...@yahoo.com.INVALID> > To: "user@struts.apache.org" <user@struts.apache.org>, > Date: 13.10.2015 13:26 > Subject: How to add a global interceptor > > Hi, > > > > I work on a project with hun

Re: How to add a global interceptor

2015-10-13 Thread Christoph Nenning
> From: Jasper Rosenberg <jasper_rosenb...@yahoo.com.INVALID> > To: Struts Users Mailing List <user@struts.apache.org>, > 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 inte

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

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 worth

Re: Unable to change content-type with Interceptor?

2015-07-27 Thread Lukasz Lenart
2015-07-23 23:18 GMT+02:00 JOSE L MARTINEZ-AVIAL jlm...@gmail.com: 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

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 lukaszlen...@apache.org: 2012/12/30 Burton Rhodes burtonrho...@gmail.com: Lukasz - Thanks for all your help.

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: Change Action Method In Interceptor

2015-03-11 Thread Lukasz Lenart
2015-03-11 16:29 GMT+01:00 R Veach rveac...@gmail.com: 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

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

2015-03-09 Thread ersinghlovepr...@gmail.com
void setUrl(String url) { this.url=url; } 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 koouy...@gmail.com: 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

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-16 Thread Tenchi Masaki
share my failing test project somewhere too. Regards, Masaki On Wed, Jan 14, 2015 at 8:28 AM, Lukasz Lenart lukaszlen...@apache.org wrote: Here is the proper configuration, see my comments below action name=chain1 class=example.Login interceptor-ref name=basicStack/ result name

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-14 Thread Lukasz Lenart
Here is the proper configuration, see my comments below action name=chain1 class=example.Login interceptor-ref name=basicStack/ result name=success type=chain param name=actionNamechain2/param /result /action action name=chain2 class=example.HelloWorld interceptor-ref

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: action name=someAction class=com.examples.SomeAction interceptor-ref name=basicStack/ result name=success type=chain param name=actionNameotherAction/param

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 koouy...@gmail.com: 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: action name=someAction class=com.examples.SomeAction interceptor-ref

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: action name=someAction class=com.examples.SomeAction interceptor-ref name=basicStack/ result name=success type=chainotherAction

Re: How to setup includes/excludes in Chaining Interceptor

2015-01-06 Thread Lukasz Lenart
interceptor-ref name=basicStack/ result name=success type=chainotherAction/result /action action name=otherAction class=com.examples.OtherAction interceptor-ref name=chain param name=includesprop1,prop2,prop3/param Can you try with just one prop here? or use expression like

How to setup includes/excludes in Chaining Interceptor

2015-01-05 Thread 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: action name=someAction class=com.examples.SomeAction interceptor-ref name=basicStack/ result name=success type

Rppe: What is the effect of Params Interceptor?

2014-09-23 Thread Vineesh Anand
On Nov 25, 2012 4:37 PM, Wu Ming rdyf4e...@gmail.com 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: action name=someAction class=com.examples.SomeAction interceptor-ref

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 ActionContext

Re: paramsPrepareParamsStack and token interceptor

2014-08-21 Thread Fabian Richter
, 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 one of the above mentioned errors persists, which is rather uncool :/ Bug or feature

Re: paramsPrepareParamsStack and token interceptor

2014-08-21 Thread Lukasz Lenart
({@InterceptorRef(value = paramsPrepareParamsStack, 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

Re: paramsPrepareParamsStack and token interceptor

2014-08-20 Thread Lukasz Lenart
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 one of the above mentioned errors persists, which is rather uncool :/ Bug or feature? Feature and bug ;-) This kind of error report

paramsPrepareParamsStack and token interceptor

2014-08-19 Thread Fabian Richter
', ] 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,token})}) But apparently only the first params interceptor in the stack uses

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

Re: dynamic interceptor insertion

2014-06-26 Thread Paul Benedict
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 PackageProvider, but I can not find

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) public String

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 afatt...@yahoo.com.invalid wrote: Please consider below action class: public class MyAction extends ActionSupport{

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(){          

S2 how to determine if a session exists from an Interceptor

2014-02-06 Thread Greg Lindholm
I have an Interceptor that wants to put something in the session after the action has executed. But if the session doesn't already exist I get an exception: java.lang.IllegalStateException: Cannot create a session after the response has been committed How can I determine if the session already

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

2014-02-06 Thread Maurizio Cucchiara
greg.lindh...@gmail.com wrote: I have an Interceptor that wants to put something in the session after the action has executed. But if the session doesn't already exist I get an exception: java.lang.IllegalStateException: Cannot create a session after the response has been committed How can I

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

2014-02-06 Thread Ken McWilliams
kind of container are you deploying your application in? I recall there being an interceptor that will attempt to create a session for light weight containers, however if struts needs to create such a session object it is doubtful that the container will be able to use it in a meaningful way. On Thu

  1   2   3   4   5   6   7   8   9   10   >