tomcat配置应用的方法

在tomcat中,配置应用,可以有几种方法:

 

1.通过tomcat的管理界面进行配置;

 

2. 在${CATALINA_HOME}/conf的server.xml中进行手工配置<Context  ... />

 

3. 将整个project打包成war,放在${CATALINA_HOME}/webapps中,tomcat会自动解压加载

 

4. 写一个xml文件,放在${CATALINA_HOME}/Catalina/localhost中,xml示例:内容就是配置在server.xml中的<Context ... > 片段

<!--

    Context configuration file for the Tomcat Manager Web App

    $Id: manager.xml 303123 2004-08-26 17:03:35Z remm $

-->


<Context docBase="${catalina.home}/server/webapps/manager"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">

  <!-- Link to the user database we will get roles from -->
  <ResourceLink name="users" global="UserDatabase"
                type="org.apache.catalina.UserDatabase"/>

</Context>
 

你可能感兴趣的:(apache,tomcat,xml,Web,配置管理)