I am trying to create a simple web application but I am facing this error :
我正在尝试创建一个简单的Web应用程序,但我遇到此错误:
HTTP Status 404 - /LatestFMS/index.html type Status report message /LatestFMS/index.html description The requested resource is not available. Apache Tomcat/7.0.57
HTTP状态404 - /LatestFMS/index.html类型状态报告消息/LatestFMS/index.html说明请求的资源不可用。 Apache Tomcat / 7.0.57
I have done everything properly , the contents of web.xml are as follows :
我已经做好了一切,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>
And index.html is present in the public folder.
index.html存在于公用文件夹中。
But when I use filter with urlMapping "/*" and I try to print anything , then it prints it but shows the 404 error .i.e the control is reaching the server and even to the filters, but its not going beyond that .i.e to index.html. I am unable to understand what is happening.
但是当我使用带有urlMapping“/ *”的过滤器并且我尝试打印任何东西时,它会打印它但显示404错误。控件到达服务器甚至是过滤器,但它不会超出那个.ie到index.html的。我无法理解发生了什么。
And when I dont use the filter and try to access the index.html page using the link "http://localhost:8082/LatestFMS/index.html" then again I it gives the 404 error.
当我不使用过滤器并尝试使用链接“http:// localhost:8082 / LatestFMS / index.html”访问index.html页面时,我再次给出404错误。
Please help me resolve this !!
请帮我解决这个问题!!
1 个解决方案
#1
Check the console or Tomcat log files - do they contains any details of error messages?
检查控制台或Tomcat日志文件 - 它们是否包含错误消息的任何详细信息?
#1
Check the console or Tomcat log files - do they contains any details of error messages?
检查控制台或Tomcat日志文件 - 它们是否包含错误消息的任何详细信息?