为什么控制台显示tomcat启动成,但打不开localhost:8080
单独开启tomcat可以访问localhost:8080,但是用idea开启就显示404
E:\apache-tomcat-8.5.51\bin\catalina.bat run
[2020-04-26 04:16:12,537] Artifact sm: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\Administrator\.IntelliJIdea2019.3\system\tomcat\Tomcat_8_5_51_sm"
Using CATALINA_HOME: "E:\apache-tomcat-8.5.51"
Using CATALINA_TMPDIR: "E:\apache-tomcat-8.5.51\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_101\jre"
Using CLASSPATH: "E:\apache-tomcat-8.5.51\bin\bootstrap.jar;E:\apache-tomcat-8.5.51\bin\tomcat-juli.jar"
Connected to the target VM, address: '127.0.0.1:52239', transport: 'socket'
26-Apr-2020 16:16:16.265 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.鏈嶅姟鍣ㄧ増鏈�: Apache Tomcat/8.5.51
26-Apr-2020 16:16:16.276 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄦ瀯寤�: Feb 5 2020 22:26:25 UTC
26-Apr-2020 16:16:16.276 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄧ増鏈彿(锛�8.5.51.0
26-Apr-2020 16:16:16.277 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
26-Apr-2020 16:16:16.277 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.鐗堟湰: 10.0
26-Apr-2020 16:16:16.277 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏋舵瀯: amd64
26-Apr-2020 16:16:16.278 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 鐜鍙橀噺: C:\Program Files\Java\jdk1.8.0_101\jre
26-Apr-2020 16:16:16.278 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 鐗堟湰: 1.8.0_101-b13
26-Apr-2020 16:16:16.278 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.渚涘簲鍟�: Oracle Corporation
26-Apr-2020 16:16:16.278 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\Administrator\.IntelliJIdea2019.3\system\tomcat\Tomcat_8_5_51_sm
26-Apr-2020 16:16:16.278 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: E:\apache-tomcat-8.5.51
26-Apr-2020 16:16:16.280 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2019.3\system\tomcat\Tomcat_8_5_51_sm\conf\logging.properties
26-Apr-2020 16:16:16.280 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Apr-2020 16:16:16.281 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52239,suspend=y,server=n
26-Apr-2020 16:16:16.281 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\Administrator\.IntelliJIdea2019.3\system\captureAgent\debugger-agent.jar
26-Apr-2020 16:16:16.281 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
26-Apr-2020 16:16:16.281 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
26-Apr-2020 16:16:16.284 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
26-Apr-2020 16:16:16.284 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
26-Apr-2020 16:16:16.285 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\Administrator\.IntelliJIdea2019.3\system\tomcat\Tomcat_8_5_51_sm\jmxremote.password
26-Apr-2020 16:16:16.285 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\Administrator\.IntelliJIdea2019.3\system\tomcat\Tomcat_8_5_51_sm\jmxremote.access
26-Apr-2020 16:16:16.285 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
26-Apr-2020 16:16:16.289 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-Apr-2020 16:16:16.291 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-Apr-2020 16:16:16.291 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-Apr-2020 16:16:16.292 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2019.3\system\tomcat\Tomcat_8_5_51_sm
26-Apr-2020 16:16:16.292 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=E:\apache-tomcat-8.5.51
26-Apr-2020 16:16:16.293 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=E:\apache-tomcat-8.5.51\temp
26-Apr-2020 16:16:16.295 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
26-Apr-2020 16:16:16.296 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
26-Apr-2020 16:16:16.296 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL閰嶇疆锛歶seAprConnector[false]锛寀seOpenSSL[true]
26-Apr-2020 16:16:16.308 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
26-Apr-2020 16:16:16.642 淇℃伅 [main] org.apache.coyote.AbstractProtocol.init 鍒濆鍖栧崗璁鐞嗗櫒 ["http-nio-8080"]
26-Apr-2020 16:16:16.689 淇℃伅 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
26-Apr-2020 16:16:16.715 淇℃伅 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1505 ms
26-Apr-2020 16:16:16.793 淇℃伅 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-Apr-2020 16:16:16.793 淇℃伅 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.51
26-Apr-2020 16:16:18.708 淇℃伅 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
26-Apr-2020 16:16:18.846 淇℃伅 [main] org.apache.coyote.AbstractProtocol.start 寮�濮嬪崗璁鐞嗗彞鏌刐"http-nio-8080"]
26-Apr-2020 16:16:18.869 淇℃伅 [main] org.apache.catalina.startup.Catalina.start Server startup in 2153 ms
Connected to server
[2020-04-26 04:16:19,135] Artifact sm: Artifact is being deployed, please wait...
26-Apr-2020 16:16:19.462 淇℃伅 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
[2020-04-26 04:16:19,492] Artifact sm: Artifact is deployed successfully
[2020-04-26 04:16:19,492] Artifact sm: Deploy took 357 milliseconds
26-Apr-2020 16:16:28.867 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [E:\apache-tomcat-8.5.51\webapps\homework6_3.war]
26-Apr-2020 16:16:29.030 淇℃伅 [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
26-Apr-2020 16:16:29.038 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [E:\apache-tomcat-8.5.51\webapps\homework6_3.war] has finished in [169] ms
26-Apr-2020 16:16:29.039 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory 鎶妛eb 搴旂敤绋嬪簭閮ㄧ讲鍒扮洰褰� [E:\apache-tomcat-8.5.51\webapps\docs]
26-Apr-2020 16:16:29.196 淇℃伅 [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
26-Apr-2020 16:16:29.200 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [E:\apache-tomcat-8.5.51\webapps\docs] has finished in [160] ms
26-Apr-2020 16:16:29.200 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory 鎶妛eb 搴旂敤绋嬪簭閮ㄧ讲鍒扮洰褰� [E:\apache-tomcat-8.5.51\webapps\examples]
26-Apr-2020 16:16:29.684 淇℃伅 [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
26-Apr-2020 16:16:29.855 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [E:\apache-tomcat-8.5.51\webapps\examples] has finished in [655] ms
26-Apr-2020 16:16:29.856 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory 鎶妛eb 搴旂敤绋嬪簭閮ㄧ讲鍒扮洰褰� [E:\apache-tomcat-8.5.51\webapps\host-manager]
26-Apr-2020 16:16:30.011 淇℃伅 [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
26-Apr-2020 16:16:30.021 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [E:\apache-tomcat-8.5.51\webapps\host-manager] has finished in [165] ms
26-Apr-2020 16:16:30.021 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory 鎶妛eb 搴旂敤绋嬪簭閮ㄧ讲鍒扮洰褰� [E:\apache-tomcat-8.5.51\webapps\manager]
26-Apr-2020 16:16:30.179 淇℃伅 [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars 鑷冲皯鏈変竴涓狫AR琚壂鎻忕敤浜嶵LD浣嗗皻鏈寘鍚玊LD銆� 涓烘璁板綍鍣ㄥ惎鐢ㄨ皟璇曟棩蹇楄褰曪紝浠ヨ幏鍙栧凡鎵弿浣嗘湭鍦ㄥ叾涓壘鍒癟LD鐨勫畬鏁碕AR鍒楄〃銆� 鍦ㄦ壂鎻忔湡闂磋烦杩囦笉闇�瑕佺殑JAR鍙互缂╃煭鍚姩鏃堕棿鍜孞SP缂栬瘧鏃堕棿銆�
26-Apr-2020 16:16:30.185 淇℃伅 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [E:\apache-tomcat-8.5.51\webapps\manager] has finished in [163] ms
正在回答 回答被采纳积分+1
我把tomcat webapp下的ROOT加入deployment,就行了。但是为什么以前没有这样做,也能访问localhost:8080?
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星