Tomcat配置根目录默认页面

xiaoxiao2022-06-12  46

方法一: 修改tomcat的server.xml(这种方法试过了,挺好用)

< Host name ="localhost" debug ="0" appBase ="webapps" unpackWARs ="true" autoDeploy ="true" xmlValidation ="false" xmlNamespaceAware ="false" > < Logger className ="org.apache.catalina.logger.FileLogger" directory ="logs" prefix ="localhost_log." suffix =".txt" timestamp ="true" /> < Context path ="" docBase ="xxxxxx" debug ="0" /> </ Host >

 方法二: 将root下的web.xml中的

< servlet > < servlet-name > org.apache.jsp.index_jsp </ servlet-name > < servlet-class > org.apache.jsp.index_jsp </ servlet-class > </ servlet > < servlet-mapping > < servlet-name > org.apache.jsp.index_jsp </ servlet-name > < url-pattern > /index.jsp </ url-pattern > </ servlet-mapping >

 删掉

 

转载请注明原文地址: https://www.6miu.com/read-4933520.html

最新回复(0)