<servlet> <servlet-name>default</servlet-name> <servlet-class> org.apache.catalina.servlets.DefaultServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
。。。。。。
<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping>
<session-config> <session-timeout>30</session-timeout> </session-config>
<mime-mapping> <extension>abs</extension> <mime-type>audio/x-mpeg</mime-type> </mime-mapping>
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
StartupListener继承自ServletContextListener,因此在容器对servletContext进行初始化的时候,会调用这个监听。
由于在appfuse应用程序的web.xml里有关于spring的配置信息,因此这里就把spring配置好了!!!
过滤器:<web-app > 各种<context-param>。。。。 各种<filter>,以及<filter-mapping>。。。。 各种<listener>。。。。 各种<servlet>,以及<servlet-mapping>。。。 <session-config> <welcome-file-list> 各种<error-page>。。。。 <taglib> <resource-ref> <security-constraint> <login-config> <security-role>
首先是关于server的定义: <Server port="8005" shutdown="SHUTDOWN" debug="0"> 。。。 关于server的注释: A "Server" is a singleton element that represents the entire JVM, which may contain one or more "Service" instances. The Server listens for a shutdown command on the indicated port. 关于listener的定义: <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0"/> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/> 关于globalNamingResources的定义: <GlobalNamingResources> <!-- Test entry for demonstration purposes --> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved"> </Resource> <ResourceParams name="UserDatabase"> <parameter> <name>factory</name> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value> </parameter> <parameter> <name>pathname</name> <value>conf/tomcat-users.xml</value> </parameter> </ResourceParams> </GlobalNamingResources> 关于service的定义: <Service name="Catalina"> 。。。 注意connector和engine(container)都是service里的元素。 关于connector的定义: <Connector port="8000" URIEncoding="gbk" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" disableUploadTimeout="true" /> 关于connector的注释: A "Connector" represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated "Container" (normally an Engine) for processing. 关于engine的定义: <Engine name="Catalina" defaultHost="localhost" debug="0"> 。。。 关于engine的注释: An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). 关于logger的定义: <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/> 关于realm的定义: <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/> 关于host的定义: <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 关于logger的定义: <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> 关于logger的注释: Logger shared by all Contexts related to this virtual host. By default (when using FileLogger), log files are created in the "logs" directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the "directory" attribute. Specify either a relative (to $CATALINA_HOME) or absolute path to the desired directory.
。。。后面还可能有关于context的定义。
server[z1] .xml:都是关于服务器一些特性的。<form-beans> 各种<form-bean> <global-exceptions> <global-forwards> 各种<forward>。。。。 <action-mappings>
各种</plug-in>
别处转载,有点乱