轉自:http://blog.csdn.net/MPU/archive/2009/08/21/4469805.aspx
< type="text/javascript"> < src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
2009-08-21下載了最新的eclipse和tomcat運行jsp居然出錯,他tomcat服務啟動不起來,鬱悶得很。
錯誤提示:
Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete.
2009-8-21 13:31:27 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:tmppj' did not find a matching property.
使用Tomcat 6.0.20搭配eclipse建立Dynamic Web Project後,
在項目上按右鍵,選擇Run As -> Run on Server方式啟動Tomcat伺服器。
在網上尋找答案,有的說將Tomcat的版本換成6.0.14就可以了;
還有的說在建立Dynamic Web Project時把"Dynamic Web Module"選項後面的版本號碼由2.5改成2.4也行。
不過這些回答好像都不能真正地解決問題。
只能自己想辦法尋找解決方案。
出現SetPropertiesRule警告的原因是因為Tomcat在server.xml的Context節點中不支援source屬性
<Context docBase="..." path="/cont" source="org.eclipse.jst.j2ee.server:cont"/>
解決方案是在Server的配置介面中選中"Publish module contexts to separate XML files"選項。