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 <chris.cranf...@setech.com> 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: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cimballi Freelance - JAVA J2EE project leader http://cimballi.elance.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org