Francisco,
Good point - I actually patched this a while ago locally and forgot to
commit it. But now I can't find the patch.
I think there were two problems, one is that ActionContext.getContext()
returns null (can't remember why) and the other is that
ParametersActionFactoryProxy tries to set the parameters using BeanUtil on
the action retrieved (which fails if you're using WW as a command framework
- ie calling ActionFactory.getAction(actionclass))
From looking in web CVS, it seems that PAFP contains
try {
BeanUtil.setProperties(ActionContext.getContext().getProperties(), action);
} ...
which fails when ActionContext.getContext() returns null. This try/catch
needs to be wrapped in an if clause.
I'm not sure why ActionContext.getContext() actually returns null, browsing
CVS web doesn't yield any immediate answers to me.
Hope this helps someone fix it :)
Cheers,
Mike
PS Does anyone else use WW without the web? (ie as a generic command pattern
framework?) I think there are a lot of improvements we could make in this
area.
Unfortunately WW's name is not the best here :)
On 1/8/02 5:44 PM, "Francisco Hernandez" (fhe...@fh...) penned
the words:
> I've got a problem with running ActionSupport based classes outside of
> webwork servlet container, what happens in that when i invoke
> ActionSupport.execute() it throws a NullPointerException which is caused by
> it calling ActionContext.getContext() which in turn is calls
> java.lang.ThreadLocal.get() which is returning null, I was able to execute
> ActionSupport.execute based classes up to version 1.1 I belive and earlier,
> what changed that could be causing this error?
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Webwork-user mailing list
> Web...@li...
> https://lists.sourceforge.net/lists/listinfo/webwork-user
|