Introduce Servlet.xml

Source: Internet
Author: User
Servlet|xml Tomcat's startup files are configured on a component basis:
<server>----Root Components
Includes properties: port= "8005" shutdown= "shutdown" debug= "0"
The following include other components:
1, <listener > components
Used to monitor some server events
<listener classname= "Org.apache.catalina.mbeans.ServerLifecycleListener"
debug= "0"/> is the container life cycle listener
<listener classname= "Org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug= "0"/> Resource Lifecycle Listener
2, <GlobalNamingResources> components
You can set up a number of global resources that are based on Jndi:
<GlobalNamingResources>
<!--Test entry for demonstration purposes-->
<environment name= "Simplevalue" type= "Java.lang.Integer" value= "/>"

<!--Editable User database that can also is used by
Userdatabaserealm to authenticate users-->
<resource name= "Userdatabase" auth= "Container"
Type= "Org.apache.catalina.UserDatabase"
description= "User database" 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>
3, <service name= "Catalina" > Components
Only one <engine > component and multiple <connector > components can be set below
4, <engine > Components to set up a number of <context> components (this is our most important component)
The basic configuration is: <context path= "/app" reloadable= "true" docbase= "D:\eclipse\workspace\webstudy"/> He set up a context:http:// Localhost:8080/app





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.