Jeromy Evans
Sun, 11 May 2008 05:44:07 -0700
Hi Kal,The UnknownHandler needs to be defined in struts.xml or struts-plugin.xml as a bean. See the struts-plugin.xml file included in the CodeBehind plugin for an example.
Declaring the bean in struts.xml registers the implementation with the Struts 2 Container (an XWork Container). It is then injected into other beans created by the framework when needed.
You may have noticed in the DefaultActionProxy that the UnknownHandler's setter carries the @Inject annotation and an required=false flag. The framework wires this setter to the UnknownHandler implementation you register with the container.
regards, Jeromy Evans kal stevens wrote:
I have been trying to implement an UnknownHandler, and I can not seem to find any documentation on how to integrate it into the framework. I am using spring for DependencyInjection, so I thought that I could just add a bean named unknownHandler, but that did not work. I could not find an example of how to set the unknownHandler field in DefaultActionProxy. Looking at the source code it looks like I have to apply the StrutsSpringObjectFactory injector to the DefaultActionProxy but I am not sure why that us happening. The map Class -> injectors contains an injector for Spring but it has no classes. I am not exactly sure where to look on how to do this. Thanks Kal------------------------------------------------------------------------No virus found in this incoming message.Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.10/1421 - Release Date: 7/05/2008 5:23 PM
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]