我正在创建一个Web应用,尝试运行“ http://localhost:8080/”时出现错误
HTTP Status 404 – Not Found
Type Status Report
Message Not found
Description The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.20
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"
>
<!-- Invoke 'Generate' action to add tags or functions -->
<servlet>
<servlet-name>searchServlet</servlet-name>
<servlet-class>com.incidents.cashout.CurlExecutor</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>searchServlet</servlet-name>
<url-pattern>/servlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>getInputs.html</welcome-file>
</welcome-file-list>
我尝试使用其他解决方案,但似乎都不起作用。任何帮助将不胜感激
答案 0 :(得分:0)
尝试将index.jsp直接放在webapp文件夹下。