I have web app project (NetBeans 7.1.2+GlassFish 3.1.2) with jdbcRealm secured folders secureuser, and secureadmin. The jdbc security is usual form login, with added security constraints. Glassfish deployment descriptor, and web.xml defined as usual. Servlet configuration is default "/faces/*".
Security works as expected when trying to access urls of the form "localhost8080/app/faces/secureduser/". However, if alternatively "localhost8080/app/faces/faces/secureduser/" is used, security is bypassed. Same goes for the other secured folder.
Adding a "/faces" to the url patterns defined in security constraints, [so that if defined pattern is "/faces/secureduser", then added "/faces/faces/secureduser"] seems to always override the security.
Since the login form is JSF, or the design requirement of the initial page at least being outside security, using a filter on context of the form "app/faces/" cannot be used.
How can security be maintained even if user types in an added prefix "/faces"?