【问题标题】:on Tomcat run the Index page not reflected在 Tomcat 上运行 Index 页面未反映
【发布时间】:2014-03-01 06:06:12
【问题描述】:

有没有人告诉我, 当 eclipse 运行如何在服务器上加载 index.jsp 时, 当我运行服务器时 index.jsp 应该反映但它不反映

【问题讨论】:

    标签: java jsp tomcat


    【解决方案1】:

    您可以使用存储在 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是你要在服务器启动时加载的文件..

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 2014-08-15
      • 2020-07-07
      • 1970-01-01
      • 1970-01-01
      • 2019-02-16
      • 2010-12-15
      • 1970-01-01
      • 2014-09-10
      • 1970-01-01
      相关资源
      最近更新 更多