尝试从Intellij IDEA运行jsp文件时,Tomcat服务器出现问题。我研究了自己的问题,发现如果采用端口8080可能会出现这个问题,但我检查了TomCat正在使用的端口都没有。 这是错误输出:
C:\xampp\tomcat\bin\catalina.bat run
[2018-05-26 06:33:16,506] Artifact Book Manger:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\Viktor\.IntelliJIdea2017.3\system\tomcat\_Book_Manger"
Using CATALINA_HOME: "C:\xampp\tomcat"
Using CATALINA_TMPDIR: "C:\xampp\tomcat\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_141"
Using CLASSPATH: "C:\xampp\tomcat\bin\bootstrap.jar;C:\xampp\tomcat\bin\tomcat-juli.jar"
??? 26, 2018 6:33:18 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.2.16 using APR version 1.6.3.
??? 26, 2018 6:33:18 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
??? 26, 2018 6:33:19 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.2m 2 Nov 2017)
??? 26, 2018 6:33:20 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
??? 26, 2018 6:33:20 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
??? 26, 2018 6:33:20 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2628 ms
??? 26, 2018 6:33:20 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
??? 26, 2018 6:33:20 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.56
??? 26, 2018 6:33:20 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
??? 26, 2018 6:33:20 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
??? 26, 2018 6:33:20 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 78 ms
Connected to server
[2018-05-26 06:33:20,673] Artifact Book Manger:war exploded: Artifact is being deployed, please wait...
??? 26, 2018 6:33:21 PM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
??? 26, 2018 6:33:21 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
??? 26, 2018 6:33:21 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
[2018-05-26 06:33:21,324] Artifact Book Manger:war exploded: Error during artifact deployment. See server log for details.
??? 26, 2018 6:33:30 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\xampp\tomcat\webapps\manager
??? 26, 2018 6:33:30 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\xampp\tomcat\webapps\manager has finished in 200 ms
localhost日志文件:
??? 26, 2018 9:25:07 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
??? 26, 2018 9:25:07 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
??? 26, 2018 9:25:07 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@cd16c4b')
??? 26, 2018 9:29:35 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
??? 26, 2018 9:29:35 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()