web.xml文件如下<?XML version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://Java.sun.com/dtd/web-app_2_3.dtd">
 <web-app>
  <display-name>My Web Application</display-name>
  <description>
   A application for test.
  </description>
 </web-app> 
 index.JSP,文件内容如下:
<html>
<body>
<center>
  Now time is: <%=new Java.util.Date()%>
</center>
</body>
</html> 启动后错误码率 找不到文件,,,,我要怎么做才行.?我觉得可能是那个WEB.XML的问题,,,,,,,,,也不懂啊
The requested resource (/myapp/index.html) is not available.

解决方案 »

  1.   

    <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
    <welcome-file>/xxxxx</welcome-file>
    </welcome-file-list>
      

  2.   

    web.xml要按标准来的
    格式不能变
    次序也不能乱<?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <!-- general description of your web application -->
    <display-name>jsp_cnbbs</display-name>
    <description>jsp_cnbbs</description>
    <welcome-file-list>
    <welcome-file>default.jsp</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
      

  3.   

    可以按tomcat/webapp/下面有例子的
      

  4.   

    你是用什么路经访问的呀。http://localhost:8080/工程名/index.jsp不行吗
      

  5.   

    你的工程部署到TOMCAT没?当然喽,,,
    http://localhost:8080/MYAPP/index.jsp么,,,,,不行啊,,,,不知道为什么,,,,,我还是怀疑WEB.XML
      

  6.   

    看看lib包有没有冲突?
    把work里面的清除了
      

  7.   

    我打开TOMCAT的例子还是可以的,,,所以一定是我写错了,,,不知道怎么改