<?xml version="1.0" encoding="UTF-8"?>   //这行有错
<web-app id="WebApp_ID" version="2.4" 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">
<display-name>               //这行也有错
lyTest</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
关键是我还没写任何程序它就报错,请大家帮我看看是什么原因哪?谢谢.不知道是不是因为我昨天用的hibernate造成的呀!

解决方案 »

  1.   

    现在运行一个最简单的程序也会出问题,以下这个程序是原来运行过的,没问题的.可现在...:<%@ page language="java" contentType="text/html; charset=gbk"
        pageEncoding="gbk"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk">
    <title>Insert title here</title>
    </head>
    <body>
    <% 
    out.println("HelloWorld From Eclipse!");
    %>
    </body>
    </html>现在的错误是:
    HTTP Status 404 - /TestTomcat/HW/HelloWorldFromEclipse.jsp--------------------------------------------------------------------------------type Status reportmessage /TestTomcat/HW/HelloWorldFromEclipse.jspdescription The requested resource (/TestTomcat/HW/HelloWorldFromEclipse.jsp) is not available.
    --------------------------------------------------------------------------------Apache Tomcat/5.5.23
      

  2.   

    如果web.xml有错,那么在tomcat启动时就会抛出异常,从而导致找不到工程下面的资源你仔细看看服务器启动时报的什么错再贴上来