I use Struts2.x and I know that Struts creates the declared bean objects in the action based on the request so that it is available to the action. I have been researching to understand which interceptors/classes does Struts use internally to create the bean object. I am trying to understand the logic that is used internally for creation of the bean objects. Does it use
PropertyUtils to populate properties for the beans or some other way? Any suggestion or pointers for reading will be helpful.
Internally Struts uses the
ObjectFactory to build all objects defined by the configuration. See more about <a href="http://struts.apache.org/docs/objectfactory.html" rel="nofollow">
ObjectFactory</a> docs or <a href="http://struts.apache.org/docs/the-struts-2-request-flow.html" rel="nofollow">The Struts 2 Request Flow</a>.
When you populate some bean using <a href="http://struts.apache.org/release/parameters-interceptor.html" rel="nofollow">
params</a> interceptor it will by default create objects if they not exist with the help of <a href="http://struts.apache.org/docs/ognl.html" rel="nofollow">OGNL</a>. It's also configurable.
PropertyUtils isn't used by the Struts2 core, but could be used by plugins if they need a