You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

ObjectFactory has the sole responsibility of creating objects needed by Struts2. It is how Struts2 does its integration with IoC containers like Spring, Pico, Plexus etc.

Customize

Customized ObjectFactory must extends off ObjectFactory or any of its decendant and have a default constructor.

To have a customized ObjectFactory, have the following entry in struts.properties

 struts.objectFactory=foo.bar.MyCustomObjectFactory

where foo.bar.MyCustomObjectFactory is the custom object factory.

 public class MyObjectFactory extends ObjectFactory {
   .....
 }
  • No labels