【发布时间】:2019-10-14 18:57:27
【问题描述】:
我正在创建一个 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>
我尝试使用其他解决方案,但它们似乎都不起作用。任何帮助将不胜感激
【问题讨论】:
标签: maven tomcat web-applications error-handling