tomcat 默认路径 和 默认起始页的设置
转自:http://xubogang.iteye.com/blog/706440首先介绍一下 tomcat 默认路径的配置方法:
我用的是tomcat 6.0 其他版本的估计也差不多
举个例子:
1 在D盘跟目录下 新建一个
[*]D:\MyJsp
D:\MyJsp
2修改server.xml文件
找到
[*]<Host>..</Host>标签
<Host>..</Host>标签
在</Host> 前插入:
[*]<Contextpath="" reloadable="true"docBase="D:\MyJsp"workDir="D:\MyJsp" />
<Contextpath="" reloadable="true"docBase="D:\MyJsp"workDir="D:\MyJsp" />
这样就修改好了,重启Tomcat就好
当然还有一个办法,就是将网站放在 webapps\ROOT中(这是默认路径)
再来介绍tomcat默认起始页
修改 web.xml中的内容
在最后一行
[*]<welcome-file-list>
[*] <welcome-file>index.html</welcome-file>
[*] <welcome-file>index.htm</welcome-file>
[*] <welcome-file>index.jsp</welcome-file>
[*]</welcome-file-list>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
添加自己网站的起始页就好
页:
[1]