码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat配置虚拟目录实现无项目名访问项目,域名直接访问

时间:2017-06-04 19:53:19      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:targe   com   好的项目   log   utf-8   nbsp   conf   host   编译   

1.tomcat下新建文件夹名为 myapp,把编译后的项目放入该文件夹,不是war包。

2.conf/Catalina/localhost目录下,新建一个ROOT.xml文件,写入类似于如下内容

<?xml version=‘1.0‘ encoding=‘utf-8‘?>
<Context path="/" docBase="项目的绝对路径" debug="0" privileged="true" reloadable="true"/>

3.再次启动的时候直接在myapp下放入解压好的项目,启动即可

 

作者原创,转载请注明:http://www.cnblogs.com/adeng/p/6075347.html 

tomcat配置虚拟目录实现无项目名访问项目,域名直接访问

标签:targe   com   好的项目   log   utf-8   nbsp   conf   host   编译   

原文地址:http://www.cnblogs.com/adeng/p/6075347.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!