`

Tomcat虚拟目录配置

 
阅读更多
在server.xml的
<host> </Host>
中间加入
<Context path="/JpgFile" docBase="d:\JpgFile" reloadable="true"


debug="0">
</Context>


即可。
注意在JpgFile文件夹里面必须包含WEB-INF文件夹和index.jsp文件,里面含有


web.xml文件
web.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>






分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics