0 Replies Latest reply on Apr 21, 2015 4:11 PM by Gerry Matte

    @ServletSecurity causes undertow exception UT000068: Servlet path match failed

    Gerry Matte Apprentice

      Has anyone successfully used servlet annotations with wildfly 8.2.0.Final ?

      I am attempting to implement security on an HttpServlet as fillows:

      @WebServlet("/permissionTester")

      @ServletSecurity(httpMethodConstraints = {@HttpMethodConstraint(value = "POST", rolesAllowed = "WebAdmin")})

       

      without the @ServletSecurity annotation both my GET and my POST method execute regardless of the roles held by the authenticated user.

       

      with the annotation, I see:

      Context Path:

      /JbossTests7

       

      Servlet Path:

      /permissionTester

       

      Path Info:

      null

       

      Query String:

      null

       

      Stack Trace

      java.lang.IllegalArgumentException: UT000068: Servlet path match failed

      io.undertow.servlet.handlers.ServletPathMatchesData.getServletHandlerByPath(ServletPathMatchesData.java:83)

      etc .....

       

      My web.xml is version 3.1.  It contains security annotation for some of my jsf pages and protected pages cause authentication and roles are enforced.

      My servlet is NOT defined in my web.xml but the WebAdmin role is defined.

       

      Does anyone see what my problem might be ?

       

      If necessary, I can of course implement my servlet security using web.xml .....