当前位置: 代码迷 >> Eclipse >> 救救初学者:eclipse3.2开发web
  详细解决方案

救救初学者:eclipse3.2开发web

热度:94   发布时间:2016-04-23 18:50:26.0
救救菜鸟:eclipse3.2开发web
我已经安照各位高手的文章一步步的配置好了eclipse,
eclipse3.2+lomboz-all-in-one+tomcat5.5
在新建的的Tomcat   Project中还可以正常编写并显示jsp,在建servlet的时候就是没找到Project,   Project   Name那里总是没有显示Project,然后我试一下建一个Dynamic   Web   Project是可以建servlet,但一开始就显示web.xml文件有错,

错误:
Referenced   file   contains   errors   (http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd).     For   more   information,   right   click   on   the   message   and   select   "Show   Details... " qq/WebContent/WEB-INF web.xml 第   1   行 1170785494218 99

The   validator   XML   Schema   Validator   is   a   delegating   validator   but   no   delegate   can   found   for   it. qq 未知 1170785494390 100

web.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>
qq </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>

请各位高手99小弟!~!~~

------解决方案--------------------
这其实是个BUG,有个临时解决的办法!把你web.xml里的一端内容(一般是第2行)换成
<web-app 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 ">
然后再保存一下就好了!
麻烦的是每次新建都要用这个来替换!
  相关解决方案