You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by oscar perez <os...@gmail.com> on 2008/04/10 14:45:36 UTC
Problem when upgrading to Struts 2.1
HI all,
I am using appfuse as start-up application for one project.
The problem is that when I upgraded from struts 2.0.11.1 to 2.1.1 my test
cases are no longer working as ActionContext.getContext() returns null.
http://www.mail-archive.com/dev@struts.apache.org/msg29571.html
I read about the refactoring of ActionContext and while I agree I cannot see
a quick-and-dirty workaround to solve this problem. How can I get a context
for running my tests now?
Thanks,
Oscar
Re: Problem when upgrading to Struts 2.1
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
oscar perez wrote:
> HI all,
> I am using appfuse as start-up application for one project.
> The problem is that when I upgraded from struts 2.0.11.1 to 2.1.1 my test
> cases are no longer working as ActionContext.getContext() returns null.
>
> http://www.mail-archive.com/dev@struts.apache.org/msg29571.html
>
> I read about the refactoring of ActionContext and while I agree I cannot see
> a quick-and-dirty workaround to solve this problem. How can I get a context
> for running my tests now?
> Thanks,
> Oscar
>
>
You need to follow the same approach used by the test cases in 2.1;
that is to setup a Configuration and create a context prior to invoking
the action.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org