4 Replies Latest reply on Feb 19, 2015 8:10 PM by Stuart Douglas

    Wildfly 8.2.0.Final HttpRequest.getAuthType() and HttpRequest.getRemoteUser() return null in servlets

    Gerry Matte Apprentice

      Hello.

      I have been trying to implement a SnoopServlet program on Wildfly 8.2.0.Final.

      I've been using it for years with multiple versions of jboss.

       

      When I implemented it with Wildfly 8.2.0.Final I discovered that it no longer can retrieve the HttpRequest RemoteUser name even though I was previously successfully challenged and authenticated when attempting to view a protected XHTML page.

       

      Has anyone else encountered problems with using these methods in an HttpServlet ?

       

      My servlet code is :

         out.println("request properties (methods of the HttpRequest):");
         out.println("Request Is Secure: " + request.isSecure());
         out.println("Auth Type: " + request.getAuthType());
         out.println("HTTP Method: " + request.getMethod());
         out.println("Remote User: " + request.getRemoteUser());
         out.println("Request URI: " + request.getRequestURI());
         out.println("Context Path: " + request.getContextPath());
         out.println("Servlet Path: " + request.getServletPath());
         out.println("Path Info: " + request.getPathInfo());
         out.println("Path Trans: " + request.getPathTranslated());
         out.println("Query String: " + request.getQueryString());

      and the output is:

      request properties (methods of the HttpRequest):

      Request Is Secure: false

      Auth Type: null

      HTTP Method: GET

      Remote User: null

      Request URI: /JbossTests7/SnoopServlet

      Context Path: /JbossTests7

      Servlet Path: /SnoopServlet

      Path Info: null

      Path Trans: null

      Query String: null