读书人

tomcat配备应用的方法

发布时间: 2012-12-24 10:43:14 作者: rapoo

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>
?

读书人网 >编程

热点推荐