【发布时间】:2014-03-01 06:06:12
【问题描述】:
有没有人告诉我, 当 eclipse 运行如何在服务器上加载 index.jsp 时, 当我运行服务器时 index.jsp 应该反映但它不反映
【问题讨论】:
有没有人告诉我, 当 eclipse 运行如何在服务器上加载 index.jsp 时, 当我运行服务器时 index.jsp 应该反映但它不反映
【问题讨论】:
您可以使用存储在 WEB-INF 文件夹中的 web.xml 文件来执行此操作
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>Welcome to Tomcat</display-name>
<description>
hello
</description>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
这里的welcome-file是你要在服务器启动时加载的文件..
希望对你有帮助
【讨论】: