在使用Eclipse 创建第一个 Servlet之后,并且配置好了tomcat,然后Run on server的之后,提示标题所示错误:
解决办法:
1、在server控制台内,在服务器上点右键--属性
2、general选项卡中点switch location
这时,location变为:/servers/tomcat6.0 server at localhost.server
3、在project explore中找到tomcat项目--Tomcat v6.0 Server at localhost.server 这个文件 ,双击打开
This is not an error. This is a warning. The difference is pretty huge. This particular warning basically means that the <Context>
element in Tomcat's server.xml
contains an unknown attribute source
and that Tomcat doesn't know what to do with this attribute and therefore will ignore it.
Eclipse WTP adds a custom attribute source
to the project related <Context>
element in the server.xml
of Tomcat which identifies the source of the context (the actual project in the workspace which is deployed to the particular server). This way Eclipse can correlate the deployed webapplication with an project in the workspace. Since Tomcat version 6.0.16, any unspecified XML tags and attributes in the server.xml
will produce a warning during Tomcat's startup, even though there is no DTD nor XSD for server.xml
.