Re: How to create mask like /pages/admin/**

Splash Forums PrettyFaces Users How to create mask like /pages/admin/** Re: How to create mask like /pages/admin/**

#20580

Hi Alex,

The pattern is a regular expression. Try something like this:

<url-mapping id="adminView">
<pattern value="/pages/admin/.*" />
<view-id>/pages/admin/main.jsf</view-id>
<action>#{securityController.check}</action>
</url-mapping>

This may, however, cause problems when generating URLs, so something like this (using regex parameter constraints) might be more appropriate:

<url-mapping id="adminView">
<pattern value="/pages/admin/#{ /.*/ page }" />
<view-id>/pages/admin/main.jsf</view-id>
<action>#{securityController.check}</action>
</url-mapping>

http://ocpsoft.com/docs/prettyfaces/snapshot/en-US/html_single/#config.pathparams.regex

-Lincoln