Exclude interceptor

2008-04-29 Thread Lukasz Lenart
Hi, Today I've been presenting Struts2 to member of Warsaw JUG and I got such question: it is possible to exclude interceptor for given action? As I know no, but maybe I'm wrong. The only way is to define interceptor for each action and omit for given one. Regards -- Lukasz http

Re: Exclude interceptor

2008-04-29 Thread Randy Burgess
interceptor Hi, Today I've been presenting Struts2 to member of Warsaw JUG and I got such question: it is possible to exclude interceptor for given action? As I know no, but maybe I'm wrong. The only way is to define interceptor for each action and omit for given one. Regards

Re: Exclude interceptor

2008-04-29 Thread Jim Kiley
Nuvox Communications From: Lukasz Lenart [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Tue, 29 Apr 2008 22:52:41 +0200 To: Struts Users Mailing List user@struts.apache.org Subject: Exclude interceptor Hi, Today I've been presenting Struts2

Re: execAndWait interceptor and setting request attribute throws NPException

2008-04-24 Thread Laurie Harper
akash agrawal wrote: Hi, When I use execAndWait interceptor and set some request attribute in my action, I get NPE: java.lang.NullPointerException at org.apache.catalina.connector.Request.setAttribute(Request.java:1376

execAndWait interceptor and setting request attribute throws NPException

2008-04-23 Thread akash agrawal
Hi, When I use execAndWait interceptor and set some request attribute in my action, I get NPE: java.lang.NullPointerException at org.apache.catalina.connector.Request.setAttribute(Request.java:1376) at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java

Re: Scope Interceptor

2008-04-20 Thread Jeromy Evans
Kibo wrote: Hi konference I read the article there: http://struts.apache.org/2.0.9/docs/scope-interceptor.html and a want use scope interceptor, but it not work my. I dont know exactly, that i good understand it. I want save into session model: Employee. Hi Tomas, You are close

Re: Scope Interceptor

2008-04-20 Thread Kibo
Hi Jeromy I understand it now. It help me the most. Thanks You very much. Here I find an practise for scope interceptor. Maybe it can need somebody. http://d.hatena.ne.jp/nikkei225f/20080111/1200022384 Tomas Jurman Czech Republic - Tomas Jurman Czech Republic -- View this message

Scope Interceptor

2008-04-19 Thread Kibo
Hi konference I read the article there: http://struts.apache.org/2.0.9/docs/scope-interceptor.html and a want use scope interceptor, but it not work my. I dont know exactly, that i good understand it. I want save into session model: Employee. // In my Action Class

Overriding subset of interceptor params

2008-04-16 Thread Jon Wilmoth
I'm trying to override one of three interceptor parameters in an action specific config using method #2 described in http://struts.apache.org/2.0.11.1/docs/interceptors.html#Interceptors-InterceptorParameterOverriding. Unfortunately the other two parameters that I'm not overriding

Re: Overriding subset of interceptor params

2008-04-16 Thread Gabriel Belingueres
Seems OK to me (according to the current documentation.) I've only overriden interceptor parameters in the declaration of a new stack, and it is working OK: interceptor-stack name=secureStack interceptor-ref name=auth / interceptor-ref name=defaultStack param name

Re: Overriding subset of interceptor params

2008-04-16 Thread Jon Wilmoth
Thanks for the response. The issue I'm seeing isn't with overriding parameters all parameters available, but rather just one or two out of all the interceptor params Doesn't work: action name=myAction class=myActionClass interceptor-ref name=myStack param name

Re: How to use annotationWorkflow Interceptor

2008-04-13 Thread 袁嘉铭
i have try it , no problem happen this is my config struts package name=struts2 extends=struts-default default-action-ref name=test / default-class-ref class=struts.action.TestActionSupport / action name=test class=struts.action.TestAction resulttest.jsp/result /action /package

Re: How to use annotationWorkflow Interceptor

2008-04-12 Thread 袁嘉铭
hi,akash i see the source code but i can't found any place config the name of annotationWorkflow interceptor. i think you will want to use it you must config it by yourself add this in your interceptors EX interceptors interceptor name=annotationWorkflow class=com.opensymphony.xwork2

How to use annotationWorkflow Interceptor

2008-04-11 Thread akash agrawal
Hi, I am looking at the example provided on this link: http://struts.apache.org/2.x/docs/annotationworkflowinterceptor.html I couldn't find annotationWorkflow in my struts-default.xml interceptor-ref name=annotationWorkflow/ I get an error from framework: 2008-04-11 18:04:58.817 ERROR

interceptor-stack and param problem

2008-04-10 Thread Tomasz Pankowski
Hi I have something like this: interceptor-stack name=myStack interceptor-ref name=interA/ interceptor-ref name=interB param name=parmAaaa/parm /interceptor-ref interceptor-ref name=interC/ /interceptor-stack action name=myAction... interceptor-ref

Simple interceptor is not called

2008-04-08 Thread Peter Theissen
Hi everybody, doese anybody see why the following (quite simple) interceptor isnt called: BTW: list.jsp seems to be called correctly. struts.xml package name=registration extends=struts-default interceptors interceptor name=simpleInterceptor class

Re: Simple interceptor is not called

2008-04-08 Thread Dave Newton
--- Peter Theissen [EMAIL PROTECTED] wrote: doese anybody see why the following (quite simple) interceptor isnt called: BTW: list.jsp seems to be called correctly. struts.xml package name=registration extends=struts-default interceptors interceptor name

Re: Simple interceptor is not called

2008-04-08 Thread Peter Theissen
Hi, Are you sure it isn't? yes ;-) What happens if you return something other than SUCCESS from your action? Unfortunately, exactly the same happens. That will test whether or not it's getting the result from the intercept call or the action itself. Now I returned Action.NONE and

Re: Simple interceptor is not called

2008-04-08 Thread Nils-Helge Garli Hegvik
Which server are you running the application in? Are you sure you have checked all the log files for the server? And are you sure you're editing the struts.xml that is actually picked up at run time? I've had some problems earlier with Eclipse not synchronizing resources properly to the correct

Noob question(s). Interceptor breaking forms, and Connection handling?

2008-04-07 Thread Dave Belfer-Shevett
an interceptor, but as soon as I add one, my getUsername() and other methods fail (the username is null). Struts.xml: http://pastebin.stonekeep.com/1893 DBInterceptor: http://pastebin.stonekeep.com/1894 Logon.java: http://pastebin.stonekeep.com/1895 If I uncomment the interceptor line in my

Re: Noob question(s). Interceptor breaking forms, and Connection handling?

2008-04-07 Thread Dave Newton
--- Dave Belfer-Shevett [EMAIL PROTECTED] wrote: I have a Logon form that works fine without an interceptor, but as soon as I add one, my getUsername() and other methods fail (the username is null). When you declare interceptor-refs for an action you are declaring *all* the interceptors

Re: Actionerrors the Store Interceptor

2008-04-03 Thread Al Sutton
Mailing List user@struts.apache.org Sent: Wednesday, April 02, 2008 10:55 PM Subject: Re: Actionerrors the Store Interceptor Sorry Lucas, I'm still not seeing how that will help differentiate between which result's need the messages collected and which don't? And I have to agree with Laurie

Re: Actionerrors the Store Interceptor

2008-04-03 Thread Chris Pratt
forwarding rather than redirecting, and the messages get shown and removed, there will be nothing for the store interceptor to store and the messages will be displayed only once. It should be a fairly simple fix and be completely backward compatible with anyone showing the messages multiple times

[DEV-IMPLICATIONS] Re: Actionerrors the Store Interceptor

2008-04-03 Thread Al Sutton
: Thursday, April 03, 2008 7:31 AM Subject: Re: Actionerrors the Store Interceptor On Wed, Apr 2, 2008 at 11:17 PM, Al Sutton [EMAIL PROTECTED] wrote: Chris, I've used the StoreInterceptor and my opinion is that it just isn't flexible enough to use. To illustrate the point, consider try following

Re: [DEV-IMPLICATIONS] Re: Actionerrors the Store Interceptor

2008-04-03 Thread Chris Pratt
On Thu, Apr 3, 2008 at 1:03 AM, Al Sutton [EMAIL PROTECTED] wrote: Chris, I'm familiar with the code, but the main problem is that there is a paper wall between the StoreInterceptor and the jsp tags, so that one does not know or rely on how the other works. As far as I'm aware this is

Re: [DEV-IMPLICATIONS] Re: Actionerrors the Store Interceptor

2008-04-03 Thread Al Sutton
[EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, April 03, 2008 4:42 PM Subject: Re: [DEV-IMPLICATIONS] Re: Actionerrors the Store Interceptor On Thu, Apr 3, 2008 at 1:03 AM, Al Sutton [EMAIL PROTECTED] wrote: Chris, I'm familiar with the code

Actionerrors the Store Interceptor

2008-04-02 Thread Chris Pratt
. We also need to give the user a pat on the back and let them know that things went well, so we're setting an ActionMessage and using the store interceptor to pass the message to the redirected page. At this point everything's working great. The problem comes in when an error occurs

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Lukasz Lenart
Hi, I think the best solution is to develop two Interceptors, one will run after action invocation and will store messages in session or some other objects from given request key. And second one, which will be run before action invocation, that will retrieve such stored messages from session and

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Laurie Harper
messages from session and put them in to the request. Umm, that's what the Store Interceptor is. We have some similar solution but for Struts1. We subclassed DispatchAction and after invocking execute() method we storing in session messaged from given request key. And before next execute(), we

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Chris Pratt
or some other objects from given request key. And second one, which will be run before action invocation, that will retrieve such stored messages from session and put them in to the request. Umm, that's what the Store Interceptor is. We have some similar solution but for Struts1. We

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Lukasz Lenart
Umm, that's what the Store Interceptor is. Not exactly, you have to specify for which action store the messages, and for which retrieve them back. There is no magic, everything hand coded ;-) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart

Re: Actionerrors the Store Interceptor

2008-04-02 Thread Chris Pratt
Sorry Lucas, I'm still not seeing how that will help differentiate between which result's need the messages collected and which don't? And I have to agree with Laurie, that I don't understand the difference between the store interceptor and what you're proposing. (*Chris*) On Wed, Apr 2, 2008

interceptor throwing global exception

2008-03-26 Thread Hartrich, James CTR USTRANSCOM J6
I'm struggling with configuring struts.xml global-results and global-exception-mappings for any exception thrown from an interceptor. What do I need to do to keep a request out of my action and instead go to the configured global-result? James smime.p7s Description: S/MIME cryptographic

Re: [S2] accessing #application and #request from a Interceptor

2008-03-17 Thread Nils-Helge Garli Hegvik
Have you tried context.getApplication()? BTW: The source code for the ServletConfigInterceptor shows how to access most of the context objects from an interceptor. Nils-H On Mon, Mar 17, 2008 at 10:16 AM, GF [EMAIL PROTECTED] wrote: On Mon, Mar 17, 2008 at 10:06 AM, GF [EMAIL PROTECTED] wrote

Re: [S2] accessing #application and #request from a Interceptor

2008-03-17 Thread GF
On Mon, Mar 17, 2008 at 10:06 AM, GF [EMAIL PROTECTED] wrote: I have some data stored in #application.mymap Inside and interceptor I want to put some of this data in #request.anothermap How can I access them? About the #request, is it right to do this? final ActionContext context

[S2] accessing #application and #request from a Interceptor

2008-03-17 Thread GF
I have some data stored in #application.mymap Inside and interceptor I want to put some of this data in #request.anothermap How can I access them? About the #request, is it right to do this? final ActionContext context = invocation.getInvocationContext(); request

[S2] Writing a simple interceptor that set a properties of the action.

2008-03-06 Thread GF
I want to do a simple thing, I have an action like this public class MyAction { private String myVar; public setMyVar(String myVar) { this.myVar = myVar; } } Inside my Interceptor i want to put in my Action a string inside myVar property of the Action. In few words, I need to discover

Re: [S2] Writing a simple interceptor that set a properties of the action.

2008-03-06 Thread stanlick
= myVar; } } Inside my Interceptor i want to put in my Action a string inside myVar property of the Action. In few words, I need to discover if the Action has that setter, and if its parameter type is a String, in this case I would call that setter. I know how to write the interceptor but i

Re: [S2] Writing a simple interceptor that set a properties of the action.

2008-03-06 Thread Adam Hardy
it via introspection, then a good way would be to set the appropriate actions to implement an interface having that setter. Then you can use instanceof to see if the action in your interceptor implements your interface. If so, cast it to the interface and call the setter. I think

Re: [S2] Writing a simple interceptor that set a properties of the action.

2008-03-06 Thread Adam Hardy
Unless you want to do it via introspection, then a good way would be to set the appropriate actions to implement an interface having that setter. Then you can use instanceof to see if the action in your interceptor implements your interface. If so, cast it to the interface and call the setter

Re: [S2] Writing a simple interceptor that set a properties of the action.

2008-03-06 Thread GF
(let's imagine a String to keep it simple) in my action. The interceptor generates in some way a String object. Finally the interceptor should try to push inside the Action object that property, I think that is the same logic used by the StaticParameters interceptor, it checks if that property

Re: [S2] Writing a simple interceptor that set a properties of the action.

2008-03-06 Thread stanlick
You could add the generated parameter to the parameters map through your interceptor. S On Thu, Mar 6, 2008 at 7:22 AM, GF [EMAIL PROTECTED] wrote: On Thu, Mar 6, 2008 at 1:52 PM, Adam Hardy [EMAIL PROTECTED] wrote: I didn't see the second half of your message until I'd sent that. What

howto 'transfer' a URL parameter to an interceptor (eg resourceID=44) pic included

2008-03-04 Thread xianwinwin
Hi all, I'm trying to create an AuthorizationInterceptor. consider the following scenario: The user clicks on any link and the the link has resourceID eg: doSomthig_update.do?resourceID=44 I would like to transfer the resouceID to my interceptor in order to verify if the user is entitle

Re: howto 'transfer' a URL parameter to an interceptor (eg resourceID=44) pic included

2008-03-04 Thread Nils-Helge Garli Hegvik
I don't think you can even do it that way. It's easier to just access the parameter map from the ActionInvocation and ActionContext in the interceptor. http://www.opensymphony.com/xwork/api/com/opensymphony/xwork2/interceptor/Interceptor.html#intercept(com.opensymphony.xwork2.ActionInvocation

About Login Interceptor

2008-02-28 Thread hardik_982
type=redirect-actionMainMenu/result interceptor-ref name=guest/ /action now i have also add in struts.xml action name=portfol_main interceptor-ref name=user/ resultportfolmain.jsp/result /action so when i click on my link it executes action

Re: [struts] [S2.1.1] How to use an Interceptor from a plugin?

2008-02-27 Thread Piero Sartini
If you don't intend to have your application's package extend the package defined in your plugin (which doesn't scale to multiple plugins), what's the benefit of having this be a plugin as opposed to just a .jar file? I hoped that the plugin architecture will help me with the configuration

Re: [struts] [S2.1.1] How to use an Interceptor from a plugin?

2008-02-27 Thread Jeromy Evans
Dale Newfield wrote: Jeromy Evans wrote: You're following the right approach. If you don't intend to have your application's package extend the package defined in your plugin (which doesn't scale to multiple plugins), what's the benefit of having this be a plugin as opposed to just a .jar

[S2.1.1] How to use an Interceptor from a plugin?

2008-02-26 Thread Piero Sartini
Hello, I am trying to write an authentication plugin for struts2. Goal is to reuse it across several projects so a plugin seems the way to go.. There is an Interceptor defined in struts-plugin.xml, lets call it AuthenticationInterceptor. Problem is that I am not able to use it in my main

Re: [S2.1.1] How to use an Interceptor from a plugin?

2008-02-26 Thread Jeromy Evans
You're following the right approach. Is the interceptor defined in your package? Normally either the plugin defines a package in struts-plugin.xml and your application extends that package, or your application needs to define the interceptor with an interceptor name=... tag. Also don't

Re: [S2.1.1] How to use an Interceptor from a plugin?

2008-02-26 Thread Piero Sartini
Am Mittwoch, 27. Februar 2008 01:59:36 schrieb Jeromy Evans: You're following the right approach. .. In any case, the approach works so you probably just have a minor config error. Post your config (struts-plugin.xml and struts.xml) if the statement above doesn't help. Thank you, that

Re: [struts] [S2.1.1] How to use an Interceptor from a plugin?

2008-02-26 Thread Dale Newfield
Jeromy Evans wrote: You're following the right approach. If you don't intend to have your application's package extend the package defined in your plugin (which doesn't scale to multiple plugins), what's the benefit of having this be a plugin as opposed to just a .jar file? -Dale

Re: How to get method name in interceptor

2008-02-21 Thread stanlick
: Hi, I'm trying to access the ActionMapping from an interceptor, like the following test stub: public String intercept(ActionInvocation invocation) throws Exception { ActionMapping am=ServletActionContext.getActionMapping(); log.info(The method is +am.getMethod

Re: How to get method name in interceptor

2008-02-21 Thread Toni Lyytikäinen
I'm trying to write an interceptor that makes redirecting decisions based on an annotation on the method on that is going to be executed. Like this: public class MyAction extends ActionSupport { ... @SomeAnnotation(value=value) public String list() { ... return SUCCESS

Re: How to get method name in interceptor

2008-02-21 Thread stanlick
Right on! Rather than bale out of the interceptor stack, do this: action ... result name=success${destination}/result and provide a get/set destination in your Action class that determines where to go next. It's much cleaner and intuitive than burying controller logic in the interceptor

Re: Extending interceptor stacks

2008-02-21 Thread Dave Newton
--- Allen, Daniel [EMAIL PROTECTED] wrote: Is there a way to have one interceptor stack defined in terms of another? I created a log-in interceptor to check if a user is logged in and redirect him/her to the log-in page if not, and it will be applied to almost all pages

Extending interceptor stacks

2008-02-21 Thread Allen, Daniel
Is there a way to have one interceptor stack defined in terms of another? I created a log-in interceptor to check if a user is logged in and redirect him/her to the log-in page if not, and it will be applied to almost all pages, but there will be a few (index, etc.) that would not need

How to get method name in interceptor

2008-02-20 Thread Toni Lyytikäinen
Hi, I'm trying to access the ActionMapping from an interceptor, like the following test stub: public String intercept(ActionInvocation invocation) throws Exception { ActionMapping am=ServletActionContext.getActionMapping(); log.info(The method is +am.getMethod()); return

Re: How to get method name in interceptor

2008-02-20 Thread stanlick
an interceptor, like the following test stub: public String intercept(ActionInvocation invocation) throws Exception { ActionMapping am=ServletActionContext.getActionMapping(); log.info(The method is +am.getMethod()); return invocation.invoke(); } According to the javadocs

Need help with Struts Interceptor/session problem.

2008-02-20 Thread daveck
align=center s:param name=colspan value=%{2} / s:param name=align value=%{'center'} / /s:submit /s:form /td/tr/table /body /html My interceptor-stack: interceptor-stack name=defaultLoginStack interceptor-ref name=servlet

Re: Need help with Struts Interceptor/session problem.

2008-02-20 Thread Dave Newton
logging / tracing / etc. to make sure the value of PARMS in the session is getting set *only* when you believe it should be (this is what I would be most suspicious of first)? That said, I'm pretty uncomfortable with this use of an interceptor: is this functionality really required across broad

Re: Need help with Struts Interceptor/session problem.

2008-02-20 Thread daveck
I've done some pretty extensive troubleshooting, but will try and expand on it. The product is a generated and delivered (as a pdf) right after the user clicks on the Confirm button. I thought that the use of an interceptor for this purpose was ideal, but I'm a Struts novice and far from

Re: Need help with Struts Interceptor/session problem.

2008-02-20 Thread Dave Newton
--- daveck [EMAIL PROTECTED] wrote: The product is a generated and delivered (as a pdf) right after the user clicks on the Confirm button. I thought that the use of an interceptor for this purpose was ideal, but I'm a Struts novice and far from an expert Java programmer. Can you explain why

Re: Need help with Struts Interceptor/session problem.

2008-02-20 Thread daveck
newton.dave wrote: I can't overstate enough that I have no idea how your application is designed--it's possible an interceptor *is* the best way to handle your needs, but I'm having trouble coming up with a reason why it would be better than just using another action, which would also

Re: Need help with Struts Interceptor/session problem.

2008-02-20 Thread Dave Newton
--- daveck [EMAIL PROTECTED] wrote: In our situation, some products are free while others are not. There's an interceptor stack for each. All are dynamically generated immediately as an html page or a pdf. An order is only generated for the products that aren't free. For those, once

Re: How to get method name in interceptor

2008-02-20 Thread Toni Lyytikäinen
. On Wed, Feb 20, 2008 at 5:40 AM, Toni Lyytikäinen [EMAIL PROTECTED] wrote: Hi, I'm trying to access the ActionMapping from an interceptor, like the following test stub: public String intercept(ActionInvocation invocation) throws Exception { ActionMapping am

Re: Struts, Interceptor error message customization

2008-02-16 Thread sarat.pediredla
I think the message customisation has been covered so onto trapping interceptor results. The easiest way you can trap a 500 error is to define the following XML in your web.xml file, error-page error-code500/error-code location/error.jsp/location /error-page In your error

Struts 2 client side validation and preparable interceptor?

2008-02-15 Thread jpiser
I have a couple of questions regarding the preparable interceptor: 1. By implementing the preparable interface alone I can have my prepare() method called before my action. Great, no problem. But If I want to utilize multiple prepare methods, e.g. prepareInput(), prepareCreate(), etc

Re: Struts 2 client side validation and preparable interceptor?

2008-02-15 Thread Laurie Harper
jpiser wrote: I have a couple of questions regarding the preparable interceptor: 1. By implementing the preparable interface alone I can have my prepare() method called before my action. Great, no problem. But If I want to utilize multiple prepare methods, e.g. prepareInput(), prepareCreate

Scope interceptor / Practical Apache Struts 2

2008-02-14 Thread Selckin
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 the included example (downloadable from http://www.apress.com/book/view

Re: Scope interceptor / Practical Apache Struts 2

2008-02-14 Thread Ian Roughley
? /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Selckin wrote: Hello, In Chapter 6 of Practical Apache Struts 2 Web 2.0 Projects, It explains how to use the scope interceptor

Re: Using il8n text in an interceptor

2008-02-13 Thread Grish
text, but when my interceptor needs to access the resource bundle it can't seem to find it. Anyone encountered a similar problem and figured it out? :( Grish wrote: Thanks for the suggestion! I tried integrating it to my code but the problem is findDefaultText always returns null. I traced

Re: Using il8n text in an interceptor

2008-02-12 Thread Pablo Vázquez Blázquez
studying how interceptors work and made a login interceptor based on Mark Menard's great tutorial: http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor I managed to integrate the interceptor in my sample application but I want to access my resource bundle for the localized error

Re: Using il8n text in an interceptor

2008-02-12 Thread Grish
Thanks for the suggestion! I tried integrating it to my code but the problem is findDefaultText always returns null. I traced the name and the locale that I am passing and they are correct. my package_en_US.properties is in my org.test.app.action package. My interceptor

Re: Interceptor Method Filtering

2008-02-11 Thread stanlick
names (e.g. sav*, upd*, edt*) Laurie Harper wrote: stanlick wrote: I would like to add more granular interceptor filtering that is sensitive to the package and name elements but do not want to violate the DRY principle. Does anyone know if there is such a capability either in 2.0.11

Re: Interceptor Method Filtering

2008-02-11 Thread Laurie Harper
stanlick wrote: I would like to add more granular interceptor filtering that is sensitive to the package and name elements but do not want to violate the DRY principle. Does anyone know if there is such a capability either in 2.0.11 or slated for 2.1? You can specify interceptors

Interceptor Method Filtering

2008-02-11 Thread stanlick
I would like to add more granular interceptor filtering that is sensitive to the package and name elements but do not want to violate the DRY principle. Does anyone know if there is such a capability either in 2.0.11 or slated for 2.1? Thanks, Scott -- View this message in context: http

Using il8n text in an interceptor

2008-02-11 Thread Grish
I'm studying how interceptors work and made a login interceptor based on Mark Menard's great tutorial: http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor I managed to integrate the interceptor in my sample application but I want to access my resource bundle

Re: Struts, Interceptor error message customization

2008-02-02 Thread Laurie Harper
Mike J. M. wrote: Hello, So I am currently using Struts, including an action that has a fileUpload Interceptor that checks for files that are too large and certain allowable file types. Right now if either of these conditions are met, the system will throw a generic HTTP 500 error up. What I

Re: session or interceptor initialization / configuration problem

2008-01-31 Thread jspring
As it turns out, I was accessing the session in the interceptor by final ActionContext context = invocation.getInvocationContext (); HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST); HttpSession session

session or interceptor initialization / configuration problem

2008-01-30 Thread jspring
I have an intermittent problem possibly related to session creation or Interceptor configuration. In a few words, when a browser is first opened and a valid action is requested, an exception is returned. After I request the base application name with no action, a successful response is returned

Struts, Interceptor error message customization

2008-01-30 Thread Mike J. M.
Hello, So I am currently using Struts, including an action that has a fileUpload Interceptor that checks for files that are too large and certain allowable file types. Right now if either of these conditions are met, the system will throw a generic HTTP 500 error up. What I am wondering is how

Re: is it possible to pass a parameter to an interceptor from the xml file?

2008-01-25 Thread xianwinwin
THANK YOU nuwan !!! this is exactly what i was looking for -- View this message in context: http://www.nabble.com/is-it-possible-to-pass-a-parameter--to-an-interceptor-from-the-xml-file--tp15074977p15090339.html Sent from the Struts - User mailing list archive at Nabble.com

is possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread xianwinwin
Hi all, I wonder if it is possible to pass a parameter with a value to an interceptor. Example: I have the following interceptor: interceptor name=authentication class=com.struts.security.AuthenticationInterceptor/ (parameterGivenInXmlFile==4) the implementation is: public String

Re: is it possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread Nuwan Chandrasoma
; } public void setHttpPort(String httpPort) { this.httpPort = httpPort; } // in the struts.xml interceptor-stack name=SecureStack interceptor-ref name=secure param name=httpPort80/param /interceptor-ref the value 80 will be inject to the variable

Re: is possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread Chris Pratt
On Jan 24, 2008 1:04 PM, xianwinwin [EMAIL PROTECTED] wrote: Hi all, I wonder if it is possible to pass a parameter with a value to an interceptor. Example: I have the following interceptor: interceptor name=authentication class=com.struts.security.AuthenticationInterceptor

Re: is it possible to pass a parameter to an interceptor from the xml file?

2008-01-24 Thread ravi_eze
; } public void setHttpPort(String httpPort) { this.httpPort = httpPort; } // in the struts.xml interceptor-stack name=SecureStack interceptor-ref name=secure 80 /interceptor-ref the value 80 will be inject to the variable httpPort

executeAndWait interceptor hibernate session closed

2008-01-10 Thread bmoraillon
Hi, How can i open hibernate session with executeAndWait interceptor ? In fact OpenSessionInViewFiltered is not called before and i get a session closed error... Thanks in advance, Benoît. -- View this message in context: http://www.nabble.com/executeAndWait-interceptor-hibernate-session

Re: executeAndWait interceptor hibernate session closed

2008-01-10 Thread Laurie Harper
bmoraillon wrote: Hi, How can i open hibernate session with executeAndWait interceptor ? In fact OpenSessionInViewFiltered is not called before and i get a session closed error... Filters execute in the order the filter-mapping elements appear in your web.xml. Make sure the mapping

Re: Problem in using Message Store Interceptor

2008-01-09 Thread Chris Pratt
Try wrapping the STORE and RECEIVE strings in param tags, like: interceptor-ref name=store param name=operationModeRETRIEVE/param /interceptor-ref (*Chris*) On Jan 8, 2008 11:49 PM, quinquin2209 [EMAIL PROTECTED] wrote: HI All, I have originally define some action

Re: Problem in using Message Store Interceptor

2008-01-09 Thread quinquin2209
Thanks for reply. I have wrap them in param tags but don't know why it disappear when posting to this forum. The problem persists even if param tag is used. Chris Pratt wrote: Try wrapping the STORE and RECEIVE strings in param tags, like: interceptor-ref name=store

Re: Interceptor doesn't work upon submit?

2008-01-09 Thread styl9090
Thank you so much... It works. :) All I had to create Interceptor will all the values of defaultStack. Thanks. newton.dave wrote: Did I not already answer this? --- styl9090 [EMAIL PROTECTED] wrote: action name=assign class=***.AssignAction interceptor-ref name=log2000

Re: Problem in using Message Store Interceptor

2008-01-09 Thread Laurie Harper
When you specify interceptors for an individual action, you are replacing the default set with what you specified. So, with the configuration you posted below, the default interceptor stack is being replaced with just the store interceptor. You would need to add a reference to the interceptor

Re: Problem in using Message Store Interceptor

2008-01-09 Thread quinquin2209
Thanks for your reply. It works now. Laurie Harper wrote: When you specify interceptors for an individual action, you are replacing the default set with what you specified. So, with the configuration you posted below, the default interceptor stack is being replaced with just

Re: problem in accessing get parameter in struts 2 [when using interceptor]

2008-01-08 Thread Mike Jennings
the following URL. http://localhost:8080/PaymentModule-war/UsersList.action?added=true I have setter and getter method for 'added'. But my problem is I am not getting value for added when I am using interceptor. It is working perfectly when I am not using intercepter. Could any one please help me

Interceptor doesn't work upon submit?

2008-01-08 Thread styl9090
Hello All, In my application I have created a LoginSessionInterceptor. struts.xml: interceptors interceptor name=log2000 class=***.LoginInterceptor / /interceptors action name=assign class=***.AssignAction interceptor-ref name=log2000/ result name=assign/pages

Re: Interceptor doesn't work upon submit?

2008-01-08 Thread Dave Newton
Did I not already answer this? --- styl9090 [EMAIL PROTECTED] wrote: action name=assign class=***.AssignAction interceptor-ref name=log2000/ result name=assign/pages/assign_user.jsp/result /action You have configured a *single* interceptor to be run for this action

Re: Interceptor doesn't work upon submit?

2008-01-08 Thread Martin Gainty
there was a posting earlier in the day on a similar question which asked inquired as adding the interceptor to your defaultStack the struts-default.xml defaultStack declaration looks like interceptor-stack name=defaultStack interceptor-ref name=exception

Problem in using Message Store Interceptor

2008-01-08 Thread quinquin2209
in the browser change to http://localhost:8080/app/main/addMember.action However, we want the URL remains as http://localhost:8080/app/main/list.action. I consider to do the redirect and use the Message Store Interceptor such that action message can be retrieve action name=list class=mainAction method

Re: Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-07 Thread Ted Husted
Hmmm, it's an interesting idea. I take it you already tried defining a property in the Interceptor, the same way we would for an Action, and a Spring bean was not injected into the Interceptor property? (I never tried it myself.) -- HTH, Ted * http://www.StrutsMentor.com/ On Jan 4, 2008 4:51

RE: Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-07 Thread Néstor Boscán
Ted it looks like Struts 2 does use the object factory for the Interceptor. I already wired the Interceptor with Spring. Thanks Alot!! -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Ted Husted Enviado el: Lunes, 07 de Enero de 2008 12:46 p.m. Para

<    5   6   7   8   9   10   11   12   13   >