struts2.3.15.1 中jsp:include与jsp:forward的用法

首先配置好struts2的过滤器:web.xml中的配置

    <filter>
        <filter-name>struts-prepare</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts-prepare</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

然后在<url-pattern>/*</url-pattern>后加上

<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>

就可以了...

原文地址:https://www.cnblogs.com/andy-do/p/3288632.html