我有一個dyanmic web項目,分別在包de.vogella.wtp.filecounter.dao;
中包含DAO FileDao和包d e.vogella.wtp.filecounter.servlets;
包中的servlet FileCounter。 我試圖運行servlet並更改端口8088,因爲我的8080已被其他應用程序佔用。當我運行這個servlet我得到下面的錯誤控制檯:試圖運行我的servlet時的HTTP狀態404
Jun 1, 2012 2:39:13 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting propert
y 'source' to 'org.eclipse.jst.jee.server:de.vogella.wtp.filecounter' did not fi
nd a matching property.
Jun 1, 2012 2:39:13 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8088"]
Jun 1, 2012 2:39:13 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8010"]
Jun 1, 2012 2:39:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 380 ms
Jun 1, 2012 2:39:13 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 1, 2012 2:39:13 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Jun 1, 2012 2:39:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8088"]
Jun 1, 2012 2:39:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8010"]
Jun 1, 2012 2:39:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 260 ms
這是錯誤:
HTTP Status 404 - /de.vogella.wtp.filecounter/servlet/de.vogella.wtp.filecounter.servlets.FileCounter
--------------------------------------------------------------------------------
type Status report
message /de.vogella.wtp.filecounter/servlet/de.vogella.wtp.filecounter.servlets.FileCounter
description The requested resource (/de.vogella.wtp.filecounter/servlet/de.vogella.wtp.filecounter.servlets.FileCounter) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/7.0.27
在什麼地方出了錯任何的猜測?
_When我跑這個servlet我得到下面的錯誤在console_我看不到任何錯誤,你打在瀏覽器中幹了什麼,什麼是你的應用程序的上下文路徑,什麼是你的servlet映射到? –
它顯示一個警告,設置屬性 y'源'爲'org.eclipse.jst.jee.server:de.vogella.wtp.filecounter'沒有fi nd一個匹配的屬性。我更新了錯誤。 – JNPW
顯示你的web.xml – mprabhat