我的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>TTV2</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
当我尝试在apache tomcat服务器9中运行它时,我的html文件是tictt.html
。它给出了404错误resource not found
。我尝试了解决方案而没有任何效果。
Jul 25, 2016 12:31:28 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TTV2' did not find a matching property.
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/9.0.0.M9
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jul 4 2016 18:22:47 UTC
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 9.0.0.0
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre1.8.0_102
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_102-b14
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\NNK\NewTicTacToe\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Apache Tomcat\apache-tomcat-9.0.0.M9
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\NNK\NewTicTacToe\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Apache Tomcat\apache-tomcat-9.0.0.M9
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\NNK\NewTicTacToe\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Apache Tomcat\apache-tomcat-9.0.0.M9\endorsed
Jul 25, 2016 12:31:28 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
Jul 25, 2016 12:31:28 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
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\jre1.8.0_102\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_102;C:\Program Files\Eclipse\eclipse;;.
Jul 25, 2016 12:31:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jul 25, 2016 12:31:29 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jul 25, 2016 12:31:29 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Jul 25, 2016 12:31:29 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jul 25, 2016 12:31:29 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1433 ms
Jul 25, 2016 12:31:29 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 25, 2016 12:31:29 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.0.M9
Jul 25, 2016 12:31:29 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-nio-8080]
Jul 25, 2016 12:31:29 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-nio-8009]
Jul 25, 2016 12:31:29 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 672 ms
我尝试卸载并重新安装,但这也无法正常工作