0

我正在尝试创建一个简单的 Web 应用程序,但我遇到了这个错误:

HTTP 状态 404 - /LatestFMS/index.html 类型状态报告消息 /LatestFMS/index.html 描述 请求的资源不可用。Apache Tomcat/7.0.57

我已经做好了一切,web.xml的内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 
    version="3.0" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>LatestFMS</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

并且 index.html 存在于公用文件夹中。

但是,当我使用带有 urlMapping "/*" 的过滤器并尝试打印任何内容时,它会打印它但显示 404 错误。即控件正在到达服务器甚至过滤器,但它不会超出此范围。即索引.html。我无法理解发生了什么。

当我不使用过滤器并尝试使用链接“ http://localhost:8082/LatestFMS/index.html ”访问 index.html 页面时,我再次给出 404 错误。

请帮我解决这个问题!!

4

0 回答 0