Initialization of JSP Struts2 and creation of classes (1/2)

Source: Internet
Author: User

Web effects phttp://www.111cn.net/Web effects p.html target=_blank >jsp Tutorials struts2 Initialization and class creation
<span style= "Font-weight:normal" > Public Xmlconfigurationprovider () {
This ("Xwork.xml", true);
}</span>

<span style= "Font-weight:normal" >public class Strutsxmlconfigurationprovider
Extends Xmlconfigurationprovider {
Public Strutsxmlconfigurationprovider (Boolean errorifmissing)
{
This ("Struts.xml", errorifmissing, NULL);
}
... </span>

Filterdispatch.init ():

<span style= "Font-weight:normal" >public void init (Filterconfig filterconfig)
Throws Servletexception {
try {
This.filterconfig = Filterconfig;
Initlogging ();
Dispatcher = Createdispatcher (Filterconfig);
Dispatcher.init ();////Initialize dispatcher.
Dispatcher.getcontainer (). inject (this);
Staticresourceloader.sethostconfig (New Filterhostconfig (Filterconfig));
finally {
Actioncontext.setcontext (NULL);
}
} </span>

Dispatch.init ():
<span style= "Font-weight:normal" >//here is the load configuration file, the real initialization of the STRUTS2 action instance has not started,
public void init () {
if (ConfigurationManager = = null) {
ConfigurationManager =
New ConfigurationManager (Beanselectionprovider.default_bean_name);
}
Init_defaultproperties (); [1]
Init_traditionalxmlconfigurations (); [2]
Init_legacystrutsproperties (); [3]
Init_customconfigurationproviders (); [5]
Init_filterinitparameters (); [6]
Init_aliasstandardobjects (); [7]
Container container = Init_preloadconfiguration ();
Container.inject (this);
Init_checkconfigurationreloading (container);
Init_checkweblogicworkaround (container);
if (!dispatcherlisteners.isempty ()) {
for (Dispatcherlistener l:dispatcherlisteners) {
L.dispatcherinitialized (this);
}
}
} </span>

Home 1 2 last page
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.