Ah that is likely the case. Thanks! Chris
> -----Original Message----- > From: [email protected] [mailto:[email protected]] > On Behalf Of Cimballi > Sent: Friday, August 13, 2010 1:43 PM > To: Struts Users Mailing List > Subject: Re: Add ValueStack Object In Interceptor > > Chris, the ParametersInterceptor clears the ValueStack, so depending > on your stack maybe that's what's happening. > > Cimballi > > > On Fri, Aug 13, 2010 at 1:09 PM, CRANFORD, CHRIS > <[email protected]> wrote: > > I am trying to add an object to the ValueStack prior to invoking the > > action; however my action is not able to see the added value in the > > stack. What is wrong with this code? > > > > // Interceptor method > > @Override > > public String intercept(ActionInvocation invocation) > > throws Exception { > > ValueStack stack = ActionContext.getContext().getValueStack(); > > stack.setValue("my.test.key", new String("Hello World")); > > return invocation.invoke(); > > } > > > > // In Action Class > > public String testMethod() > > throws Exception { > > String s = (String) > > ActionContext.getContext().getValueStack().findValue("my.test.key"); > > log.debug("my.test.key : " + (s != null ? s : "<null>"); > > } > > > > I constantly get "my.test.key : <null>". > > > > Why? > > > > Chris > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > > -- > Cimballi > Freelance - JAVA J2EE project leader > http://cimballi.elance.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >

