📄 org_apache_catalina_startup_catalina--rosonsandy.htm
字号:
<P><FONT
style="BACKGROUND-COLOR: #ffffff">
digester.addObjectCreate("Server/Service/Connector/Factory",<BR>
"org.apache.catalina.net.DefaultServerSocketFactory",<BR>
"className");<BR>
digester.addSetProperties("Server/Service/Connector/Factory");<BR>
digester.addSetNext("Server/Service/Connector/Factory",<BR>
"setFactory",<BR>
"org.apache.catalina.net.ServerSocketFactory");</FONT></P>
<P><FONT
style="BACKGROUND-COLOR: #ffffff">
digester.addObjectCreate("Server/Service/Connector/Listener",<BR>
null, // MUST be specified in the
element<BR>
"className");<BR>
digester.addSetProperties("Server/Service/Connector/Listener");<BR>
digester.addSetNext("Server/Service/Connector/Listener",<BR>
"addLifecycleListener",<BR>
"org.apache.catalina.LifecycleListener");</FONT></P>
<P><FONT
style="BACKGROUND-COLOR: #ffffff">
// Add RuleSets for nested
elements<BR> <SPAN lang=EN-US
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">//</SPAN><SPAN
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">设置<SPAN
lang=EN-US>GlobalNamingResources</SPAN>的属性</SPAN></FONT></P>
<P><FONT style="BACKGROUND-COLOR: #ffffff"><SPAN
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:=""> </SPAN>digester.addRuleSet(new
NamingRuleSet("Server/GlobalNamingResources/"));<BR>
<SPAN lang=EN-US
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">//</SPAN><SPAN
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">设置<SPAN
lang=EN-US>Engine</SPAN>的属性</SPAN><BR>
digester.addRuleSet(new
EngineRuleSet("Server/Service/"));<BR>
<SPAN lang=EN-US
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">//</SPAN><SPAN
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">设置<SPAN
lang=EN-US>Host</SPAN>的属性</SPAN><BR>
digester.addRuleSet(new
HostRuleSet("Server/Service/Engine/"));<BR>
</FONT><FONT color=#009933><FONT style="BACKGROUND-COLOR: #ffffff">//
commented by roson<BR> //
digester.addRuleSet(new
ContextRuleSet("Server/Service/Engine/Default"));</FONT><FONT
style="BACKGROUND-COLOR: #ffcc00"><BR><FONT
style="BACKGROUND-COLOR: #ffffff"> //
digester.addRuleSet(new
NamingRuleSet("Server/Service/Engine/DefaultContext/"));<BR>
// digester.addRuleSet(new
ContextRuleSet("Server/Service/Engine/Host/Default"));<BR>
// digester.addRuleSet(new
NamingRuleSet("Server/Service/Engine/Host/DefaultContext/"));<BR></FONT></FONT><FONT
style="BACKGROUND-COLOR: #ffffff">
digester.addRuleSet(new
ContextRuleSet("Server/Service/Engine/Host/"));<BR>
//set naming <BR>
digester.addRuleSet(new
NamingRuleSet("Server/Service/Engine/Host/Context/"));</FONT></FONT><FONT
style="BACKGROUND-COLOR: #ffffff">
<SPAN lang=EN-US
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">//</SPAN><SPAN
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">设置<SPAN
lang=EN-US>Context</SPAN>的属性</SPAN></FONT><BR></P>
<P><FONT style="BACKGROUND-COLOR: #ffcc00"><FONT
style="BACKGROUND-COLOR: #ffffff">
<SPAN lang=EN-US
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">//StandardEngine.setParentClassLoader=Catalina.parentClassLoader</SPAN><BR>
digester.addRule("Server/Service/Engine",<BR>
new SetParentClassLoaderRule(digester,</FONT><BR></FONT><FONT
style="BACKGROUND-COLOR: #ffffff">
parentClassLoader));</FONT></P>
<P><FONT
style="BACKGROUND-COLOR: #ffffff">
return (digester);<BR> }</FONT></P>
<P><BR> /**<BR> * Create and
configure the Digester we will be using for
shutdown.<BR> */<BR> protected
Digester createStopDigester() {</P>
<P> // Initialize the
digester<BR> Digester digester = new
Digester();<BR> if
(debug)<BR>
digester.setDebug(999);</P>
<P> // Configure the rules we need
for shutting down<BR>
digester.addObjectCreate("Server",<BR>
"org.apache.catalina.core.StandardServer",<BR>
"className");<BR>
digester.addSetProperties("Server");<BR>
digester.addSetNext("Server",<BR>
"setServer",<BR>
"org.apache.catalina.Server");</P>
<P> return (digester);</P>
<P> }</P>
<P><BR> /**<BR> * Execute the
processing that has been configured from the command
line.<BR> */<BR> protected void
execute() throws Exception {</P>
<P>
//starting=true;
//change by roson<BR> if
(starting)<BR>
start();<BR> else if
(stopping)<BR>
stop();</P>
<P> }</P>
<P><BR> /**<BR> * Set the
<CODE>catalina.base</CODE> System property to the
current<BR> * working directory if it has not been
set.<BR> */<BR> protected void
setCatalinaBase() {</P>
<P> if
(System.getProperty("catalina.base") !=
null)<BR>
return;<BR>
System.setProperty("catalina.base",<BR>
System.getProperty("catalina.home"));</P>
<P> }</P>
<P><BR> /**<BR> * Set the
<CODE>catalina.home</CODE> System property to the
current<BR> * working directory if it has not been
set.<BR> */<BR> protected void
setCatalinaHome() {</P>
<P> if
(System.getProperty("catalina.home") !=
null)<BR>
return;<BR>
System.setProperty("catalina.home",<BR>
System.getProperty("user.dir"));</P>
<P> }</P>
<P><FONT style="BACKGROUND-COLOR: #ffffff"></FONT><BR> <FONT
style="BACKGROUND-COLOR: #999999"> /**<BR> * Start a
new server instance.<BR> */<BR> <FONT
style="BACKGROUND-COLOR: #ffffff"> protected void start()
{<BR> // Create and execute our
Digester<BR> //Digester here act as
role to instance every object by a chain
<BR> //between each
object<BR> Digester digester =
createStartDigester();<BR> <SPAN
lang=EN-US
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">//</SPAN><SPAN
style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: 新宋体; mso-hansi-font-family: "
roman?;="" new="" times="" ar-sa?="" zh-cn;="" en-us;="" ?times=""
mso-bidi-font-family:="" mso-ansi-language:="" mso-fareast-language:=""
mso-bidi-language:="">默认的配置文件是<SPAN lang=EN-US>
conf/server.xml</SPAN></SPAN></FONT><BR></FONT><FONT
style="BACKGROUND-COLOR: #ffffff">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -