开发者

Java EE web.xml: How to exclude a single page from a <url-pattern>

开发者 https://www.devze.com 2023-01-22 16:12 出处:网络
I w开发者_StackOverflowant on all pages BUT ONE (header.jsp) to include-coda like in this code: <jsp-property-group>

I w开发者_StackOverflowant on all pages BUT ONE (header.jsp) to include-coda like in this code:

<jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
<include-coda>footer.jsp</include-coda>

I just don't get how I can limit the Pattern to exclude header.jsp


Use a more specific url-pattern which doesn't cover the header.jsp. E.g. put those JSPs in a folder and use /foldername/* as url-pattern instead. Or, give the JSP a different extension so that it doesn't match the url-pattern, e.g. header.jspf (JSP fragment).

0

精彩评论

暂无评论...
验证码 换一张
取 消