我正在使用Glassfish 4.1.1,JSF Mojarra 2.2,omnifaces 2.4,primefaces 6.0和EE7。 我有以下LoginFilter:
@WebFilter(filterName = "LoginFilter", urlPatterns = {"/secure/*"})
public class LoginFilter extends HttpFilter {
...
}
我开始使用Omnifaces ExtensionlessURLs,现在过滤器不再运行了。我的 web.xml :
<context-param>
<param-name>org.omnifaces.FACES_VIEWS_SCAN_PATHS</param-name>
<param-value>/*.xhtml</param-value>
</context-param>
<context-param>
<param-name>org.omnifaces.FACES_VIEWS_SCANNED_VIEWS_ALWAYS_EXTENSIONLESS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.omnifaces.FACES_VIEWS_EXTENSION_ACTION</param-name>
<param-value>REDIRECT_TO_EXTENSIONLESS</param-value>
</context-param>
我对 / secure / home 的请求不会方便地更改为 / home 。我不想将 urlPatterns 更改为“/ *”。 我应该如何使用Extensionless重新运行过滤器?