我正在運行Tomcat 6.0.36。在控制檯中獨立運行時,服務器運行正常。我還配置了Eclipse能夠運行它,以便我可以調試。配置成功完成,沒有錯誤。但是,當我運行服務器時,我無法在瀏覽器中訪問http://localhost:8080
(獲得404)。無法連接到在Eclipse中啓動的Tomcat 6的實例
這裏是Eclipse的痕跡:
Feb 27, 2013 6:02:53 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: <my path>
Feb 27, 2013 6:02:53 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 27, 2013 6:02:53 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 294 ms
Feb 27, 2013 6:02:53 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 27, 2013 6:02:53 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Feb 27, 2013 6:02:53 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 27, 2013 6:02:53 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 27, 2013 6:02:53 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Feb 27, 2013 6:02:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 164 ms
控制檯跟蹤如下:
Feb 27, 2013 6:02:00 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.23 using APR version 1.4.6.
Feb 27, 2013 6:02:00 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Feb 27, 2013 6:02:01 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized with version OpenSSL 1.0.0g 18 Jan 2012
Feb 27, 2013 6:02:01 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 27, 2013 6:02:01 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1026 ms
Feb 27, 2013 6:02:01 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 27, 2013 6:02:01 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Feb 27, 2013 6:02:01 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 27, 2013 6:02:01 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Feb 27, 2013 6:02:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 341 ms
我注意到的第一件事情就是從Eclipse跟蹤二號線:
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
雖然功能良好的控制檯跟蹤報告小號
INFO: Loaded APR based Apache Tomcat Native library 1.1.23 using APR version 1.4.6.
是APR確實是問題嗎?如果是,我該如何解決它,以便Eclipse服務器使用與控制檯相同的庫?