修改過程:
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>)
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>)
4.刪除%CATALINA%/work目錄下的一切。我就是沒有清理這個目錄,導致http://localhost:8080永遠都是那只貓~~~~郁悶
5.重起tomcat。一切搞定