Struts2 2.5 version of the new filter-class configuration

In web.xml default code:


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app>

StrutsPrepareAndExecuteFilter here is very critical, because the default struts2 framework version 2.5 Intellij has not been accepted, it is the default file will be generated web.xml old version of things.
Also this place gains across the board, and actually compile time is not marked out on a file browser, so I looked for a long time did not notice.
After all, the program does not run the default generated up, I thought it was a problem to configure it. . .

Guess you like

Origin www.cnblogs.com/tieway59/p/10990356.html