Jsp Struts2 initialization and class creation (1/2)

Source: Internet
Author: User

Webpage special effect p/Webpage special effect p.html target = _ blank> jsp tutorial 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 errorimissing)
{
This ("struts. xml", errorimissing, null );
}
...... </Span>

// Filterdispatch. init ():

<Span style = "font-weight: normal"> public void init (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"> // the configuration file is loaded. the initialization of the struts2 action instance has not started yet,
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 = init_preloadconfiguration ();
Container. inject (this );
Init_checkconfigurationreloading (container );
Init_checkweblogicworkaround (container );
If (! Dispatcherlisteners. isempty ()){
For (dispatcherlistener l: dispatcherlisteners ){
L. dispatcherinitialized (this );
}
}
} </Span> 1 2

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.