Java 我的项目似乎无法识别struts.xml
Java 我的项目似乎无法识别struts.xml,java,eclipse,struts2,Java,Eclipse,Struts2,/WEB-INF/WEB.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app id="MyStrutsApp" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xm
/WEB-INF/WEB.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="MyStrutsApp" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
支柱2
org.apache.struts2.dispatcher.filter.strutspreadexecutefilter
org.springframework.web.context.ContextLoaderListener
支柱2
/*
我将struts.xml
放在src
下,并将其设置在web.xm
l中,但只得到404个错误
在
struts.xml
中使用
来启用日志错误。默认情况下,struts.xml
文件应位于应用程序类路径的根目录,而不是WEB-INF
中。看看它是如何部署的。如果你不能遵循教程,那么选择另一个。