在web.xml中配置jsp-config实现jsp自动导入

在web.xml中配置jsp-config实现jsp自动导入,关键配置如下:

<jsp-config>
        <jsp-property-group>
            <url-pattern>*.jsp</url-pattern>
            <include-prelude>/WEB-INF/jsp/system/common.jsp</include-prelude>
        </jsp-property-group>
    </jsp-config>

基本含义是:匹配所有的jsp文件,符合条件就自动导入common.jsp到文件中。

猜你喜欢

转载自www.cnblogs.com/famousLion/p/9656195.html