Re: Problem with result returning from interceptor

2009-09-09 Thread ManiKanta G
result-type name=tiles class=org.apache.struts2.views.tiles.TilesResult default=true / /result-types !-- interceptors interceptor-stack configuration -- interceptors interceptor name=auth class=com.sify.s2.interceptor.AuthInterceptor

Interceptor Stacks [Was: Re: File upload in Struts 2]

2009-09-03 Thread Dale Newfield
Greg Lindholm wrote: Here [1] is where I found the doc on Interceptor Parameter Overriding. [1] http://struts.apache.org/2.1.6/docs/interceptors.html#Interceptors-InterceptorParameterOverriding I'm confused. With Method 2 is there one instantiated interceptor stack, or two

Re: [SOLVED]: Need to disable session interceptor

2009-09-02 Thread Dave Newton
Rajeev Sharma wrote: I am not using session or cookies at all in my application right now. So I guess adding cookie listener doesn't make any sense to be added to JMeter test case. I shall use cookies later and shall add cookie listener to test my application. I don't want to store any data in

Need to disable session interceptor

2009-09-01 Thread Rajeev Sharma
can I remove the session interceptor at all (and other components related to sessions), so that there are no sessions created in my application. -- Rajeev - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org

Re: Need to disable session interceptor

2009-09-01 Thread Dave Newton
created. How can I remove the session interceptor at all (and other components related to sessions), so that there are no sessions created in my application. There isn't a session created for each request, there's a session per client conversation. Also, AFAIK, Struts 2 doesn't do anything

Re: Need to disable session interceptor

2009-09-01 Thread Nils-Helge Garli Hegvik
the session interceptor at all (and other components related to sessions), so that there are no sessions created in my application. There isn't a session created for each request, there's a session per client conversation. Also, AFAIK, Struts 2 doesn't do anything in particular regarding session

RE: Need to disable session interceptor

2009-09-01 Thread Martin Gainty
interceptor From: nil...@gmail.com To: user@struts.apache.org From the JMeter FAQ: How do I ensure each http request for jsp is within one jsessionid ? http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-114aca8407cf0eaff55b7ae5955eda46b1e2cecb Nils-H On Tue, Sep 1, 2009 at 1:15 PM, Dave

[OT] Re: Need to disable session interceptor

2009-09-01 Thread Nils-Helge Garli Hegvik
interceptor From: nil...@gmail.com To: user@struts.apache.org From the JMeter FAQ: How do I ensure each http request for jsp is within one jsessionid ? http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-114aca8407cf0eaff55b7ae5955eda46b1e2cecb Nils-H On Tue, Sep 1, 2009 at 1:15 PM, Dave

RE: Need to disable session interceptor

2009-09-01 Thread Rajeev Sharma
I googled this and the struts2 performance tuning page says this Struts 2 does not create sessions unless asked to (for example, by having the createSession interceptor in your interceptor stack). Note that when you use SiteMesh however, a session will always be created I am never creating

RE: [OT] Re: Need to disable session interceptor

2009-09-01 Thread Martin Gainty
Sep 2009 15:40:42 +0200 Subject: [OT] Re: Need to disable session interceptor From: nil...@gmail.com To: user@struts.apache.org Hm... I don't know... Maybe read the documentation? http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Cookie_Manager Sorry for pinging

Re: Need to disable session interceptor

2009-09-01 Thread Nils-Helge Garli Hegvik
I am trying to find out why is the session created when I did not create the session in my code. -- Rajeev Well, I believe Struts 2 internally does request.getSession(false) to prevent creating sessions when there isn't one... Which interceptor stack are you using? You could also try adding

Re: Need to disable session interceptor

2009-09-01 Thread musomesa
Mailing List user@struts.apache.org Sent: Tue, Sep 1, 2009 9:49 am Subject: RE: Need to disable session interceptor I googled this and the struts2 performance tuning page says this Struts 2 does not create sessions unless asked to (for example, by having the createSession interceptor in your

Re: Need to disable session interceptor

2009-09-01 Thread Peter Phillips
When I upgraded from 2.0.x to 2.1.7 I found that the i18n interceptor now always creates a session too. The way I normally track down rogue session creations is to debug tomcat in Eclipse and add breakpoints to the javax.servlet.http.HttpServletRequest.getSession

Re: Need to disable session interceptor

2009-09-01 Thread Dave Newton
In any case, Nils' thing about JMeter needing a cookie doodad so it keeps the same session per simulated client. Dave Peter Phillips wrote: When I upgraded from 2.0.x to 2.1.7 I found that the i18n interceptor now always creates a session too. The way I normally track down rogue session

[SOLVED]: Need to disable session interceptor

2009-09-01 Thread Rajeev Sharma
. Are you sure i18n interceptor in 2.1.7 creates the session for every client? Should 2.1.6 and 2.1.7 have differences like this? it should be a minor release with no major changes. That's just my guess and interested to know your opinion. -- Rajeev Sharma Sr. Software Engineer Yahoo! Inc -Original

Re: [SOLVED]: Need to disable session interceptor

2009-09-01 Thread Dave Newton
Rajeev Sharma wrote: I did not have %@ page session=false in the jsps which were included in other jsps using s:include. I put %@ page session=false in all the jsp pages and there are no more sessions created. Thank you guys for the quick help. That's not the correct solution: if you expect

Re: [SOLVED]: Need to disable session interceptor

2009-09-01 Thread Peter Phillips
From Rajeev's earlier emails: I am developing an application which does not need to use sessions at all. I opened some pages on my application and found there was one session created for my browser and others for other clients, So I guess this has nothing to do with JMeter. Sessions are being

Re: [SOLVED]: Need to disable session interceptor

2009-09-01 Thread Dave Newton
Peter Phillips wrote: From Rajeev's earlier emails: I am developing an application which does not need to use sessions at all. I opened some pages on my application and found there was one session created for my browser and others for other clients, So I guess this has nothing to do with

Re: [SOLVED]: Need to disable session interceptor

2009-09-01 Thread Rajeev Sharma
@struts.apache.org To: Struts Users Mailing List user@struts.apache.org Subject: Re: [SOLVED]: Need to disable session interceptor Date: Tue, 01 Sep 2009 16:10:28 -0400 Peter Phillips wrote: From Rajeev's earlier emails: I am developing an application which does not need to use sessions at all. I opened some

Problem with result returning from interceptor

2009-08-21 Thread ManiKanta G
-result in the default namespace. But I m getting exception saying 'No result found with name...'. Result config: global-results result name=login type=redirectActionlogin/result /global-results Intercept() of interceptor: public String intercept(ActionInvocation invocation) throws Exception

Re: Problem with result returning from interceptor

2009-08-21 Thread Wes Wannemacher
exception saying 'No result found with name...'. Result config: global-results result name=login type=redirectActionlogin/result /global-results Intercept() of interceptor:  public String intercept(ActionInvocation invocation) throws Exception { MapString, Object session

Re: Problem with result returning from interceptor

2009-08-21 Thread musomesa
returning from interceptor Hi, In my application actions are distributed into several namespaces using Conventions plugin. When a request come for an action in a namespace (other than default one, say, myapp/admin/action-name), and when there is no user session found, I m returning

Problem using scope interceptor

2009-08-18 Thread spsarolkar
-interceptor-ref name=paramsPrepareParamsStack / global-results result name=unknownError/WEB-INF/jsp/error.jsp/result result name=dupPK/WEB-INF/jsp/user/findUser-success.jsp/result /global-results global-exception-mappings exception-mapping

Re: How to use workflow interceptor??

2009-08-15 Thread Dave Newton
spsarolkar wrote: I want to write simple program using workflow interceptor where can i find information about workflow interceptor I'd start with the workflow interceptor docs: http://struts.apache.org/2.x/docs/workflow-interceptor.html That said, I'm not sure what you mean; any app

How to use workflow interceptor??

2009-08-14 Thread spsarolkar
Hello everyone, I want to write simple program using workflow interceptor where can i find information about workflow interceptor thanks -- View this message in context: http://www.nabble.com/How-to-use-workflow-interceptor---tp24970880p24970880.html Sent from the Struts - User mailing list

Re: Scope interceptor / Practical Apache Struts 2

2009-08-14 Thread spsarolkar
Source web: http://www.fdar.com - email: i...@fdar.com Selckin wrote: Hello, In Chapter 6 of Practical Apache Struts 2 Web 2.0 Projects, It explains how to use the scope interceptor to create sort of wizard pages. I've been trying to figure these out, but cannot get this to work. Even

Struts - 2.1.6 - Prepare Interceptor

2009-08-13 Thread Kishan Paandy
to achieve this? Please advice. Thank you. Regards, Kishan.G -- View this message in context: http://www.nabble.com/Struts---2.1.6---Prepare-Interceptor-tp24950462p24950462.html Sent from the Struts - User mailing list archive at Nabble.com

Re: Struts - 2.1.6 - Prepare Interceptor

2009-08-13 Thread Nils-Helge Garli Hegvik
want both the prepare() in AbstractBaseAction MyAction2 to be called one after the other in the same order for MyAction3. How to achieve this? Please advice. Thank you. Regards, Kishan.G -- View this message in context: http://www.nabble.com/Struts---2.1.6---Prepare-Interceptor

Re: struts 2 portlet interceptor issue

2009-08-04 Thread Tracy12
on this Note: UserSession is one of our custom classes Nils-Helge Garli wrote:                action name=testAction class=test.MyAction                        interceptor-ref name=sessionScopeHandler/interceptor-ref                        result/jsp/test/test.jsp/result                /action

struts 2 portlet interceptor issue

2009-08-03 Thread Tracy12
Hi, I wrote a interceptor as follows but looks like variables/parameters in the action class are not populated as part of the form submission. Which means introspection does not seem to work it gives null values, I only defined the interceptor not modified the default stack, pls advice how

Re: struts 2 portlet interceptor issue

2009-08-03 Thread Nils-Helge Garli Hegvik
               action name=testAction class=test.MyAction                        interceptor-ref name=sessionScopeHandler/interceptor-ref                        result/jsp/test/test.jsp/result                /action With this configuration, your sessionScopeHandler will be the only

Re: EJB Injection in Interceptor

2009-07-31 Thread Robin Mannering
Wow! Thanks for all this great feedback and ideas regards this problem. I'm sorry I cannot add any useful prompts to help you develop a plugin Wes as Spring and it's methods for injection are something I know nothing about. I have to admit, injection is not something I fully understand and

Re: EJB Injection in Interceptor

2009-07-31 Thread Haroon Rafique
Hi Robin, see comments inline: On Today at 7:25pm, RM=Robin Mannering ro...@mtndesigns.co.uk wrote: RM [..snip..] RM RM Can I just ask two further small questions to Haroon? RM RM Is the EJBInvokerServlet set to initialise at app startup via the RM web.xml definition? RM Nope. Its not

Re: EJB Injection in Interceptor

2009-07-31 Thread Haroon Rafique
On Today at 2:02pm, HR=Haroon Rafique haroon.rafi...@utoronto.ca wrote: HR [..snip..] HR HR Nope. Its not mentioned anywhere else in the app. Its just packaged in HR the .war file (which is inside the .ear). Glassfish does the right thing HR when it sees a servlet marked with the @EJB

Re: EJB Injection in Interceptor

2009-07-30 Thread Robin Mannering
Just to clear up my actual question from the thread below as feedback has run dry unfortunately. Is there anybody working daily with Struts 2 and EJB 3.0? If so, what is the best way to obtain local references to EJB 3 session beans from within Struts 2 action classes? Thanks for any

Re: EJB Injection in Interceptor

2009-07-30 Thread Struts Two
You can either use Spring or implement your own EJB3 interceptor. Though I use my own EJB3 interceptor, I believe the best option is to go with Spring. Google Juice can also be option on the table as well. --- On Thu, 7/30/09, Robin Mannering ro...@mtndesigns.co.uk wrote: From: Robin

Re: EJB Injection in Interceptor

2009-07-30 Thread Wes Wannemacher
Sorry Robin, this is on my to-do list, but it's not something I'm working on right this second. One thing that is holding me up is the lack of knowledge of JEE. Is there a standard mechanism for creating instances of EJB-hydrated objects? For instance, if you annotated a field on a servlet with

Re: EJB Injection in Interceptor

2009-07-30 Thread Haroon Rafique
On Today at 9:16am, WW=Wes Wannemacher w...@wantii.com wrote: WW Sorry Robin, this is on my to-do list, but it's not something I'm WW working on right this second. One thing that is holding me up is the WW lack of knowledge of JEE. Is there a standard mechanism for creating WW instances of

Re: EJB Injection in Interceptor

2009-07-30 Thread Wes Wannemacher
On Thu, Jul 30, 2009 at 10:34 AM, Haroon Rafiqueharoon.rafi...@utoronto.ca wrote: Hi Wes, I don't know much of the details about the JEE spec, however, I can share my implementation with you. The code is not in production yet, so caveat emptor (it works for us, for now in development). I

Re: EJB Injection in Interceptor

2009-07-30 Thread David Blevins
Just to note, there has been some work in OpenEJB to make it so Struts objects can use Java EE injection like Servlets or JSF components can. Karan did the work, he might be able to give more detail. -David On Jul 30, 2009, at 6:16 AM, Wes Wannemacher wrote: Sorry Robin, this is on my

Re: EJB Injection in Interceptor

2009-07-30 Thread Nathan Schulte
Robin Mannering robin at mtndesigns.co.uk writes: http://cwiki.apache.org/S2PLUGINS/ejb3-plugin.html Are you using that plugin, or the following? http://cwiki.apache.org/S2PLUGINS/ejb3-jboss-plugin.html With the JBoss plugin, I am able to use Local interfaces rather than remote. I can show an

EJB Injection in Interceptor

2009-07-16 Thread Nathan Schulte
This may be more related to XWork2, but I'll start by asking here. I'm creating a custom Interceptor to handle user permissions for an application. Rather than redirecting to an action to actually process a login attempt (requiring a custom result type), the Interceptor itself will process

Re: EJB Injection in Interceptor

2009-07-16 Thread Nils-Helge Garli Hegvik
...@ngc.com wrote: This may be more related to XWork2, but I'll start by asking here. I'm creating a custom Interceptor to handle user permissions for an application.  Rather than redirecting to an action to actually process a login attempt (requiring a custom result type), the Interceptor itself

Re: EJB Injection in Interceptor

2009-07-16 Thread Nathan Schulte
familiar with this issue. I guess, in order to resolve it in an Interceptor as opposed to an Action (the method of using an Interceptor and reflection to do the injection), one would have to do the same for the Interceptors... Oh well, you can't win all of the time. Thanks for the speedy reply

Re: EJB Injection in Interceptor

2009-07-16 Thread Wes Wannemacher
/Struts2-Action-Class-and-EJB-Injection-td24497801.h tml Yes, I'm familiar with this issue. I guess, in order to resolve it in an Interceptor as opposed to an Action (the method of using an Interceptor and reflection to do the injection), one would have to do the same for the Interceptors

Re: EJB Injection in Interceptor

2009-07-16 Thread Nathan Schulte
Wes Wannemacher wesw at wantii.com writes: Seems to me that my idea to create an ObjectFactory based plugin ... needs to pick up some steam. I only have one question for the EJB users out there... Do you guys need Spring integration as well? To answer your question, _I_ personally don't need

Interceptor Execution Tracing

2009-07-02 Thread Stephen Turner
Is it possible to easily see a record of all the interceptors executed during an action invocation? I want to see the actual interceptors that are executed, not the config (which shows me what I _think_ is happening). Thanks, Steve -- Stephen Turner Sr. Analyst/Programmer MIT IST - SAIS

Re: Interceptor Execution Tracing

2009-07-02 Thread Paweł Wielgus
Hi Stephen, turn debug on by adding ?profiling=true after any action address in browser and turning devMode. Read more here: http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/util/profiling/UtilTimerStack.html Best greetings, Paweł Wielgus. 2009/7/2 Stephen Turner

Re: Interceptor Execution Tracing

2009-07-02 Thread Stephen Turner
On Thu, 02 Jul 2009 08:37:28 -0400, Paweł Wielgus poulw...@gmail.com wrote: Hi Stephen, turn debug on by adding ?profiling=true after any action address in browser and turning devMode. Read more here:

Re: Need help writing an interceptor to force a user to change their password

2009-06-30 Thread Russell Neufeld
Thanks Nate and Tim. Worked like a charm. Russ Sarr, Nathan wrote: Hi Russ, You may want to try creating a global result in your struts.xml: global-results result name=change-password/pages/user/login/force_change_password.jsp/result /global-results Then in your interceptor

Need help writing an interceptor to force a user to change their password

2009-06-29 Thread Russell Neufeld
Hi all, I'm trying to implement functionality which will force a user to a change-password page if a certain bit is set on their user account. That is, no matter what action they are attempting to take, I'd like to intercept the request and show them a change-password page. I've

Need help writing an interceptor to force a user to change their password

2009-06-29 Thread Russell Neufeld
Hi all, I'm trying to implement functionality which will force a user to a change-password page if a certain bit is set on their user account. That is, no matter what action they are attempting to take, I'd like to intercept the request and show them a change-password page. I've written a

Re: Need help writing an interceptor to force a user to change their password

2009-06-29 Thread Timothy Orme
You should be able to just create a global result with the jsp you want. Ala: global-results result name=passwordChange/passwordChange.jsp/result /global-results Then have the interceptor return that string when needed. Any time it's true, the result will get hit and the user will get

RE: Need help writing an interceptor to force a user to change their password

2009-06-29 Thread Sarr, Nathan
Hi Russ, You may want to try creating a global result in your struts.xml: global-results result name=change-password/pages/user/login/force_change_password.jsp/result /global-results Then in your interceptor return the result name change-password That is how we accomplished something

Interceptor Use

2009-06-27 Thread Robin Mannering
Hello, Struts 2.1.6 I wish to ensure a user is logged into an application before allowing him/her to execute certain tasks. Would using an Interceptor be a good way to go? My idea is to retrieve session data in the intercept() method of the interceptor and verify a certain attribute

Re: Interceptor Use

2009-06-27 Thread Dave Newton
Robin Mannering wrote: I wish to ensure a user is logged into an application before allowing him/her to execute certain tasks. Would using an Interceptor be a good way to go? Yep. Dave - To unsubscribe, e-mail: user

Re: Interceptor Use

2009-06-27 Thread Jim Kiley
is logged into an application before allowing him/her to execute certain tasks. Would using an Interceptor be a good way to go? My idea is to retrieve session data in the intercept() method of the interceptor and verify a certain attribute is held in the session. If it is not, I would

Custom validation interceptor

2009-06-20 Thread Peter Bliznak
Hi,I have following requirement:If validation of the page fails 3 times in row - invalidate session and redirect to index page.Should I replace default validation interceptor in default stack with my own to achieve what I am after?I there any other way?Any hint would be greatly appreciatedPeter.

Re: Custom validation interceptor

2009-06-20 Thread Wes Wannemacher
I don't think a custom interceptor is required. You could probably get this done through hidden parameters or by storing attempts in the session or something. Do you have this req for one action or all actions in the app? On 6/20/09, Peter Bliznak bliz...@rogers.com wrote: Hi, I have following

Re: Custom validation interceptor

2009-06-20 Thread Dave Newton
Peter Bliznak wrote: I have following requirement: If validation of the page fails 3 times in row - invalidate session and redirect to index page. Should I replace default validation interceptor in default stack with my own to achieve what I am after? I there any other way? Is this across

Re: Custom validation interceptor

2009-06-20 Thread Peter Bliznak
, June 20, 2009 7:57:24 PM Subject: Re: Custom validation interceptor Peter Bliznak wrote: I have following requirement: If validation of the page fails 3 times in row - invalidate session and redirect to index page. Should I replace default validation interceptor in default stack with my own

Re: Custom validation interceptor

2009-06-20 Thread Dave Newton
of parameters - but I am looking for cleanest possible implementation. But if I decide to modify default stack I am not certain what might be consequences for the rest of app. None, if you do it right. Since it's across the entire app I'd go the interceptor route--but you're still going to have

Re: Custom validation interceptor

2009-06-20 Thread Peter Bliznak
Preciously!..what you said about changing form is exactly what I was thinking. From: Dave Newton newton.d...@yahoo.com To: Struts Users Mailing List user@struts.apache.org Sent: Saturday, June 20, 2009 8:35:50 PM Subject: Re: Custom validation interceptor

Re: Interceptor issue in Struts 2.1.6

2009-06-18 Thread Dave Newton
Yanto wrote: thanks, we are able to run the interceptor now, but we have another issue, the interceptor will Loop, we create the sample follow the code from the webworks *public* *class* *InterceptorSample* *extends* AbstractInterceptor { @Override *public* String intercept

Re: Interceptor issue in Struts 2.1.6

2009-06-18 Thread Yanto
Hi Dave, thanks, we already solve the interceptor issue, we need to include the defaultstack before the custom interceptor.. after that it's working fine... Regards Yanto On Thu, Jun 18, 2009 at 7:36 PM, Dave Newton newton.d...@yahoo.com wrote: Yanto wrote: thanks, we are able to run

Re: Interceptor issue in Struts 2.1.6

2009-06-17 Thread Yanto
Finally we found the issue is actually with the theme, we need to stop using simple themeand the validation and interceptor will work. http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td23127366.html just wondering, is there any other theme that working with validation

Re: Interceptor issue in Struts 2.1.6

2009-06-17 Thread Wes Wannemacher
xhtml. -Wes On Wed, Jun 17, 2009 at 6:15 AM, Yantoyantob...@gmail.com wrote: Finally we found the issue is actually with the theme, we need to stop using simple themeand the validation and interceptor will work. http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple

Why all this WARN on interceptor (and how to eliminate?)

2009-06-17 Thread Stefano Tranquillini
Hi all. I developed an application with struts2, tiles and EJB using jboss. In the log of jboss i've a lot of warning: 15:28:13,484 WARN [InterceptorRegistry] applicable interceptors is non-existent for public boolean session.MGMTBean.addCustomer(java.lang.String,java.lang.Stri

Re: Why all this WARN on interceptor (and how to eliminate?)

2009-06-17 Thread Lukasz Lenart
I think it's unrelated to Struts, check that [1] [1] http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.0/html/EJB3_Interceptors.html Regards -- Lukasz http://www.lenart.org.pl/ - To

Re: Interceptor issue in Struts 2.1.6

2009-06-17 Thread Yanto
at 6:15 AM, Yantoyantob...@gmail.com wrote: Finally we found the issue is actually with the theme, we need to stop using simple themeand the validation and interceptor will work. http://www.nabble.com/Struts2-Validation-not-working-with-theme-simple-td23127366.html just wondering

Re: Why all this WARN on interceptor (and how to eliminate?)

2009-06-17 Thread Stefano
Ok i can ignore them. On Wed, Jun 17, 2009 at 15:34, Lukasz Lenart lukasz.len...@googlemail.comwrote: I think it's unrelated to Struts, check that [1] [1] http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.0/html/EJB3_Interceptors.html Regards --

Interceptor issue in Struts 2.1.6

2009-06-16 Thread Yanto
Hi, I am trying to use the following simple interceptor test the interceptor concepts but is not happened while calling the action class. Sample interceptor class. *import* *com.opensymphony.xwork2.ActionContext*; *import* com.opensymphony.xwork2.ActionInvocation; *import

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Paweł Wielgus
Hi Yanto, use this [1] plugin to verify if all namespaces and stacks are as You think they should be. [1] http://struts.apache.org/2.x/docs/config-browser-plugin.html Best greetings, Paweł Wielgus. 2009/6/16 Yanto yantob...@gmail.com: Hi, I am trying to use the following simple interceptor

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Yanto
Hi Pawel, thanks for the link we already check the interceptor for the namespace, and it's showing the interceptor yang we configure in the config-browser-plugin TimerInterceptor com.opensymphony.xwork2.interceptor.TimerInterceptor but, when we check from the Apache console, the interceptor

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Yanto
after we add validationWorkflowStack interceptor before the timer, then the timer interceptor will show the result, interceptor-ref name=validationWorkflowStack/ interceptor-ref name=timer/ if we use the above in the action it is printing the timer value like below [2009-06-16 18:03:41,218

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Dave Newton
Yanto wrote: action name=test class=test.QuizAction interceptor-ref name=sample / /action This will configure *only* the sample interceptor. If you specify *any* interceptors on a per-action basis you must configure *all* interceptors. This can be done in several ways. - specify all

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Volker Karlmeier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, sounds like you mixed up interceptors and action classes. Look at *http://struts.apache.org/2.x/docs/interceptors.html *regards Volker Yanto schrieb: Hi, I am trying to use the following simple interceptor test the interceptor concepts

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Yanto
Hi Dave, after following your note, we are able to run our sample interceptor, however now we have another issue the sample interceptor will always looping, since we have the following code in the sample interceptor, *return* invocation.invoke(); but the sample interceptor will not run, if we

Re: Interceptor issue in Struts 2.1.6

2009-06-16 Thread Yanto
Hi Volker, thanks, we are able to run the interceptor now, but we have another issue, the interceptor will Loop, we create the sample follow the code from the webworks *public* *class* *InterceptorSample* *extends* AbstractInterceptor { @Override *public* String intercept

Interceptor - Conditional Redirect to alternate action

2009-06-08 Thread Mitchell, Steven
I need to put an interceptor after the cookie interceptor that will send the user to a preference page if a preference cookie is missing rather than let the desired action fire--like a guard condition. If I was using a Filter I would just do a redirect. Eventually I will also add a Flash shared

Re: Interceptor - Conditional Redirect to alternate action

2009-06-08 Thread Wes Wannemacher
Could you use a global-result? http://struts.apache.org/2.x/docs/result-configuration.html#ResultConfiguration-GlobalResults I would just think up a unique name for the set of conditions that should cause the redirect. Then, configure that string as a global-result and write your interceptor

RE: Interceptor - Conditional Redirect to alternate action

2009-06-08 Thread Mitchell, Steven
Oh, wow, that's incredibly simple. I was making it too complicated in my mind, thinking I needed to tell the ActionInvocation class not to allow the original action to fire. I see now that the answer was right there in the API [Interceptor.intercept()] - Allows the Interceptor to... short

Interceptor (Thread Safety)

2009-06-02 Thread ZeckoN
to the result from the first action, right? is defining the intercept method as synchronized a solution? thanks for the help. -- View this message in context: http://www.nabble.com/Interceptor-%28Thread-Safety%29-tp23836386p23836386.html Sent from the Struts - User mailing list archive at Nabble.com

Re: Interceptor (Thread Safety)

2009-06-02 Thread Dave Newton
ZeckoN wrote: public String intercept(ActionInvocation actionInvocation) throws Exception { .Do some pre work String result = actionInvocation.invoke(); .Do some after work return result; } Local variables aren't shared across method invocations. Dave

Re: Interceptor (Thread Safety)

2009-06-02 Thread Wes Wannemacher
On Tue, Jun 2, 2009 at 12:45 PM, ZeckoN zec...@gmail.com wrote: If two copies of the same action is run at the same time parallelly (by ajax, iframe, etc.) in the same session, possibly with different parameters, do these actions call the same instance of an interceptor's intercept() method?

Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-28 Thread Wes Wannemacher
xnpeng, I think you are missing the point, packages have interceptor and interceptor stack definitions. Actions live inside of packages. What you need to do is move your conventions actions into your package. The interceptor ref annotation will point to the stacks you want, but it does no good

Struts2 Interceptor

2009-05-27 Thread Stefano Corallo
Hi all, can an interceptor call an arbitraty action different from the action requested by the client? Suppose i've the interceptor interceptor-router placed in the stack and the client call MyAction.action, when the interceptor intercept the call is possible to 'redirect' the call

Re: Struts2 Interceptor

2009-05-27 Thread Chris Pratt
in the interceptor, just return the name of the global result and you've effectively called that action. (*Chris*) On Tue, May 26, 2009 at 11:53 PM, Stefano Corallo stefan...@gmail.comwrote: Hi all, can an interceptor call an arbitraty action different from the action requested by the client? Suppose

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 s:set 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 s:set may not be applicable to my requirement.

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

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 Martin Gainty
you might possibly be breaking the one action class design of Struts is there anything in the 2nd Action class which will not be accomodated by the first class? right now its simple to look at the interceptor stack and determine which class is being called in what order..although technically

Interceptor Trouble

2009-05-27 Thread Jim Collings
So, I've edited the struts.xml appropriately and I've created an Interceptor that implements the interceptor interface. Init() is called on startup but I can't get it to call intercept() to save my life. My objective is to create an interceptor that checks to see if a session variable is set

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

Re: Struts2 Interceptor

2009-05-27 Thread Stefano Corallo
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 struts.xml because i can't know what action to call. If you make the global result shortCircuitRedirect redirect

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

Re: Struts2 Interceptor

2009-05-27 Thread Stefano Corallo
actions, you might be able in the interceptor to get ahold of the ognl valueStack and set the value directly, then refer to #shortCircuitRedirectUrl (in the ognl dictionary rather than an attribute on action (top of ValueStack)). -Dale

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 s:set tag to set the variable to the value of a scriplet expression like so: s:set value=fred%= myVar%/s:set Again, there are much better ways of coding modern web applications that

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 Martin Gainty
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 To: user@struts.apache.org Subject: Re: Struts2 Interceptor Stefano Corallo wrote: i think

<    1   2   3   4   5   6   7   8   9   10   >