无法为Struts2之外的静态内容提供服务

无法为Struts2之外的静态内容提供服务,struts2,Struts2,我有一个简单的Struts2应用程序,可以很好地提供JSP文件。但是当我尝试提供CSS文件时,我得到了404 这是我的web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocati

我有一个简单的Struts2应用程序,可以很好地提供JSP文件。但是当我尝试提供CSS文件时,我得到了404

这是我的web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">
   <session-config>
      <session-timeout>
            30
      </session-timeout>
   </session-config>
   <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
   </welcome-file-list>
   <filter>
      <filter-name>struts2</filter-name>
      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
   </filter>

   <filter-mapping>
      <filter-name>struts2</filter-name>
      <url-pattern>/*</url-pattern>
   </filter-mapping>
</web-app>
在我的WEB-INF中,我有一个内容文件夹,在那里我使用约定插件提供JSP文件。我尝试将css\application.css文件夹/文件直接放在content和web inf根目录中。两者都不起作用

任何提示都将不胜感激


谢谢

别客气。我想出来了。我把文件夹放错地方了

它需要直接放在web文件夹中,而不是web-INF