Tomcat中未检测到更改服务器设置和添加新文件

问题描述 投票:0回答:1

我正在尝试按照本页中的教程学习如何使用servlet:

https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html

当我达到2.6步骤5:开发和部署WebApp时,我被告知要重新启动tomcat,以便它将加载我刚刚创建的目录。但是,我所做的更改未加载,分配的端口仍然是8080,即使我将其分配给9999并且找不到hello目录。以下是我发布startup.bat时的消息:

Apr 26, 2019 5:32:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.2.21 using APR version 1.6.5.
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.1.1a  20 Nov 2018)
Apr 26, 2019 5:32:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Apr 26, 2019 5:32:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Apr 26, 2019 5:32:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 494 ms
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 26, 2019 5:32:04 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Apr 26, 2019 5:32:04 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\docs
Apr 26, 2019 5:32:05 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [146] milliseconds.
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\examples
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\host-manager
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\manager
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory G:\Tomcat 2\webapps\ROOT
Apr 26, 2019 5:32:05 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Apr 26, 2019 5:32:05 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Apr 26, 2019 5:32:05 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1092 ms

如您所见,未部署hello目录。那么,这里究竟发生了什么?

java apache tomcat servlets
1个回答
0
投票

我刚刚意识到当我发出启动和关闭命令时,控制台中有一个信息如下所示:

Using CLASSPATH: "G:\Learning\tomcat9\bin\bootstrap.jar;G:\Learning\tomcat9\bin\tomcat-juli.jar"

我的类路径似乎指向了错误的路径。我在环境变量设置中删除了CATALINA_HOME,现在它正常工作。

© www.soinside.com 2019 - 2024. All rights reserved.