2015-10-05 42 views

回答

0

在$ TOMCAT_HOME/conf目录/ 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> 

默认的servlet尝试加载索引。*文件按所列顺序排列。您可以通过在$ TOMCAT_HOME/webapps/ROOT中创建index.html文件轻松覆盖index.jsp文件。这个文件包含一个新的静态主页或者重定向到一个servlet的主页是比较常见的。重定向将如下所示:

<html> 

<head> 
<meta http-equiv="refresh" content="0;URL=http://webaddress.com/some/path/to/servlet/homepage/"> 
</head> 

<body> 
</body> 

</html> 
相关问题