读书人

用eclipse如何刚一建个project,就报we

发布时间: 2011-12-06 23:05:08 作者: rapoo

用eclipse怎么刚一建个project,就报wel.xml有错误呢?
<?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造成的呀!


[解决办法]
如果web.xml有错,那么在tomcat启动时就会抛出异常,从而导致找不到工程下面的资源

你仔细看看服务器启动时报的什么错

再贴上来

读书人网 >Java Web开发

热点推荐