我无法显示tomcat的默认网页。 该网页说:
此网页不可用 ERR_CONNECTION_REFUSED
我在server.xml中将端口设置为8081
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
我有一个launch.bat文件,它应该在cmd中运行时启动Tomcat,除非我误解它是如何工作的。我是初学者,之前从未使用过Tomcat。 这是运行的deploy.bat文件。任何帮助表示赞赏。
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\Joe>cd workspace/TomcatProject/src/week09/week09
C:\Users\Joe\workspace\TomcatProject\src\week09\week09>launch.bat
'launch.bat' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Joe\workspace\TomcatProject\src\week09\week09>cd..
C:\Users\Joe\workspace\TomcatProject\src\week09>launch.bat
C:\Users\Joe\workspace\TomcatProject\src\week09>setlocal
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOOLS_HOME=C:\projects\tools\
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOMCAT_HOME=tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
C:\Users\Joe\workspace\TomcatProject\src\week09>SET CATALINA_HOME=C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\startup.bat
Using CATALINA_BASE: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_HOME: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_TMPDIR: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\temp"
Using JRE_HOME: "C:\Program Files\Java\jre1.8.0_65"
Using CLASSPATH: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\bootstrap.jar;C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\tomcat-juli.jar"
C:\Users\Joe\workspace\TomcatProject\src\week09>launch.bat
C:\Users\Joe\workspace\TomcatProject\src\week09>setlocal
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOOLS_HOME=C:\projects\tools\
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOMCAT_HOME=tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
C:\Users\Joe\workspace\TomcatProject\src\week09>SET CATALINA_HOME=C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\startup.bat
Using CATALINA_BASE: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_HOME: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_TMPDIR: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\temp"
Using JRE_HOME: "C:\Program Files\Java\jre1.8.0_65"
Using CLASSPATH: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\bootstrap.jar;C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\tomcat-juli.jar"
C:\Users\Joe\workspace\TomcatProject\src\week09>launch.bat
C:\Users\Joe\workspace\TomcatProject\src\week09>setlocal
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOOLS_HOME=C:\projects\tools\
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOMCAT_HOME=tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
C:\Users\Joe\workspace\TomcatProject\src\week09>SET CATALINA_HOME=C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\startup.bat
Using CATALINA_BASE: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_HOME: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_TMPDIR: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\temp"
Using JRE_HOME: "C:\Program Files\Java\jre1.8.0_65"
Using CLASSPATH: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\bootstrap.jar;C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\tomcat-juli.jar"
C:\Users\Joe\workspace\TomcatProject\src\week09>launch.bat
C:\Users\Joe\workspace\TomcatProject\src\week09>setlocal
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOOLS_HOME=C:\projects\tools\
C:\Users\Joe\workspace\TomcatProject\src\week09>SET TOMCAT_HOME=tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
C:\Users\Joe\workspace\TomcatProject\src\week09>SET CATALINA_HOME=C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14
C:\Users\Joe\workspace\TomcatProject\src\week09>C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\startup.bat
Using CATALINA_BASE: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_HOME: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14"
Using CATALINA_TMPDIR: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\temp"
Using JRE_HOME: "C:\Program Files\Java\jre1.8.0_65"
Using CLASSPATH: "C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\bootstrap.jar;C:\projects\tools\tomcat\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\bin\tomcat-juli.jar"
C:\Users\Joe\workspace\TomcatProject\src\week09>
答案 0 :(得分:2)
您可能因为修改了/?
配置而没有停止Tomcat。日志文件最初包含tomcat的成功启动,然后由于“绑定失败”而导致多次失败启动,这通常意味着tomcat仍在运行。所以停止它,然后重新启动它,它应该工作。