Thank you Matt and Dustin,
I copy-pasted Dustin's code and now the tests run again.
In order to start up the application I had to set also the parameter
actionPackages. It seems that for the struts 2.1.1 codebehind plugin this is
no longer optional.
However, I am not done yet. Now I am running into the problem that basically
the OgnlValueStack is not working at all. I am able to get and set the
values as long as I do it via requests/responses but the value stack is not
able to store anything. It keeps showing warnings like this:

OgnlValueStack.warn(46) | Could not find property [operation]

I also noticed that in the new struts-default.xml  for struts 2.1.1 has been
added a new interceptor.
<interceptor-ref name="actionMappingParams"/>
This looks like the cause of my problem but removing it does not solve it.
Has anybody run into the same problem?
Thanks again,
Oscar

On Thu, Apr 10, 2008 at 6:27 PM, Dustin Pearce <[EMAIL PROTECTED]>
wrote:

> I started this process, but I have not taken it all the way.  I think the
> main issue is that with Struts 2.1.1 and Xwork 2.1.1 we have
> an opportunity to change the Struts actions to be less Http dependent.  This
> is a good thing.  Struts gives you access to the Request and Response
> through interfaces like RequestAware or ServletRequestAware.  Using these in
> our actions means we won't have to use ActionContext.getContext() to get
> what we need.
> So far, I found the package name change in DateConverter.java to import
> com.opensymphony.xwork2.conversion.TypeConversionException.  I also was able
> to get the tests to pass with an NPE by adding the following to
> BaseActionTestCase to setup the Xwork context:
>
>         ConfigurationManager configurationManager = new
> ConfigurationManager();
>         configurationManager.addContainerProvider(new
> XWorkConfigurationProvider());
>         Configuration config = configurationManager.getConfiguration();
>         Container container = config.getContainer();
>
>         ValueStack stack =
> container.getInstance(ValueStackFactory.class).createValueStack();
>         stack.getContext().put(ActionContext.CONTAINER, container);
>         ActionContext.setContext(new ActionContext(stack.getContext()));
>
> That fixed the NPE, but that is as far as I got.  My ultimate plan was to
> retool the Appfuse Struts actions to use the new Rest plugin and remove all
> the xml, and then take it even further with example apps for Facebook, etc!
>  Let me know if you can start up your webapp once you get the tests to pass.
>  Also if you have a different NPE from the dojo plugin, put the stacktrace
> up and we can work it out.
>
> -D
>
> On Apr 10, 2008, at 4:48 AM, oscar perez wrote:
>
> Hi all,
> I am running into this problem when upgrading appfuse to use struts 2.1
> and the dojo plugin:
>
> http://www.nabble.com/Getting-ready-for-Struts-2.1.1-td16231688s2369.html
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg29571.html
>
> Anybody knows of a quick-and-dirty workaround to solve this issue?
> Thanks
> Oscar
>
>
>
>

Reply via email to