You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ken McWilliams <ke...@gmail.com> on 2012/11/12 08:23:12 UTC

How to implement custom ActionProxyFactory

I think I'm missing something fundamental.

I extended StrutsActionProxyFactory (MyActionProxyFactory) which has very
similar behaviour as it's parent except that createActionProxy prints out a
log message so I can see that it is indeed being used.

How do I tell struts2 (2.3.4.1) to use my ActionProxyFactory?

I tried to set it in struts.xml (I thought I could override the already
existing bean defining the ActionProxyFactory) by saying:

<bean type="com.opensymphony.xwork2.ActionProxyFactory" name="struts"
class="org.apache.struts2.impl.MyActionProxyFactory"/>

But that does not work. I'd show stack trace and mention that the errors
are related to components already having been loaded but I think I'm going
about this the wrong way altogether, so what is the right way to do this?

If spring is required that will not be an issue but if it can be avoided
that would be great (only use what is provided by struts2).

Re: How to implement custom ActionProxyFactory

Posted by Ken McWilliams <ke...@gmail.com>.
Thank you Łukasz! Knew it should be obvious... embarrassingly obvious. I'll
start a new thread concerning what I'd like to do with it, to seek advice.


On Mon, Nov 12, 2012 at 1:14 AM, Łukasz Lenart <lu...@gmail.com>wrote:

> Hi,
>
> <bean type="com.opensymphony.xwork2.ActionProxyFactory"
> name="myProxyFactory"
> class="org.apache.struts2.impl.MyActionProxyFactory"/>
> <constant name="struts.actionProxyFactory" value="myProxyFactory"/>
>
> http://struts.apache.org/2.x/docs/plugins.html#Plugins-ExtensionPoints
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How to implement custom ActionProxyFactory

Posted by Łukasz Lenart <lu...@gmail.com>.
Hi,

<bean type="com.opensymphony.xwork2.ActionProxyFactory"
name="myProxyFactory"
class="org.apache.struts2.impl.MyActionProxyFactory"/>
<constant name="struts.actionProxyFactory" value="myProxyFactory"/>

http://struts.apache.org/2.x/docs/plugins.html#Plugins-ExtensionPoints


Regards
--
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org