Tomcat 7.0启动很好,但没有测试

时间:2013-07-01 02:27:16

标签: tomcat7

我在Windows 7计算机上安装了Tomcat 7.0。它似乎运行正常: 它开始于Eclipse。以下是控制台上的整个日志:

Jun 30, 2013 10:16:25 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: C:\Program Files\Java\jre7\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live\Shared;C:\Program Files\Java\jdk1.7.0_07\bin; C:\Program Files\Java\jre6\bin; c:\Borland\Bcc55\bin; C:\MinGW\bin; C:\MinGW\MSYS\1.0\local\bin; C:\MinGW\MSYS\1.0\bin; C:\MinGW\MSYS\1.0;  C:\MSYS\1.0; C:\MinGW\lib\gcc\mingw32\4.6.2\include\c++\bits; C:\MinGW\MSYS\1.0\home\boost\boost_1_51_0; c:\Users\AYSE\apache-tomcat-7.0.40\bin; c:\Users\AYSE\apache-tomcat-7.0.40; c:\Users\AYSE\apache-tomcat-7.0.40\lib; ;C:\Users\AYSE\Downloads\eclipse;;.
Jun 30, 2013 10:16:28 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 30, 2013 10:16:28 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 30, 2013 10:16:28 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4825 ms
Jun 30, 2013 10:16:28 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 30, 2013 10:16:28 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Jun 30, 2013 10:16:30 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [290] milliseconds.
Jun 30, 2013 10:16:30 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 30, 2013 10:16:30 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 30, 2013 10:16:30 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1993 ms

它也在Windows上正常启动。

但是,当我尝试打开网址时

http://localhost:8080/ 

在浏览器中,我收到HTTP 404错误消息,指出所请求的源不可用。

我按照http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html上的说明进行安装。我也尝试了默认设置中的端口80。

正在运行以执行基本servlet。

我缺少什么?

// ============================================= =================================

更新:

我从那时起改变了Eclipse上的服务器位置

"Use workspace metadata (does not modify Tomcat installation)"

"Use Tomcat installation (takes control of Tomcat installation)". 

这一次,当我尝试从Eclipse启动Tomcat时,我在弹出窗口中收到以下错误消息:

Server apache-tomcat-7.0.40 at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

并且Eclipse控制台上的日志是

Jun 30, 2013 10:46:00 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: 

<... the contents of my PATH environment variable...>

然而,

Tomcat解压缩文件的bin文件夹位于PATH中。不仅如此,我还在路径中添加了基本的Tomcat文件夹和\ lib文件夹。

// ============================================= =================================

更新:重启Eclipse并工作!

仍然不知道那里出了什么问题。

我会猜测使用“小心”。

0 个答案:

没有答案