TOMCAT首页设置

来源:互联网 发布:淘宝上买iphone 编辑:程序博客网 时间:2024/05/02 01:48
第一步:配置访问的首页面 
1.不要碰conf目录下的那个web.xml文件。 
2.把原来的ROOT目录清空,里面什么都不要留。删掉或者改名随便你怎么弄都成。只要清空就好。 
3.发布你自己的项目到ROOT目录下,用war包发布或者用直接拷贝的都一个效果。保证index.html/index.htm/index.jsp其中一个存在于ROOT目录下。 
发布程序\webapps\ROOT\WEB-INF\webxml需有 
<!--默认首页定义--> 
<welcome-file-list> 
<welcome-file>index.jsp</welcome-file> 
<welcome-file>index.html</welcome-file> 
</welcome-file-list> 
4.删除%CATALINA%/work目录下的一切 
5.重起tomcat。 
第二部:首页面内容 
<html> 
<head> 
<script language="javascript"> 
window.location.href="/《请求的服务》/"; 
</script> 
</head> 
</html>
0 0