1 Reply Latest reply on Feb 21, 2006 2:45 AM by Himadri Saha

    getUserPrincipal returns null in web application

    Himadri Saha Newbie

      I am using a custom LoginModule whose commit() method looks like this:

      Set ssoUserPrincipals = subject.getPrincipals(SSOUser.class);
      Group callerPrincipal = new SimpleGroup("CallerPrincipal");
      Iterator j = ssoUserPrincipals.iterator();
      if (j.hasNext()) {
      Principal user = (Principal) j.next();


      SSOUser is the custom principal. This LoginModule is invoked by a Tomcat valve to perform authentication.

      My web.xml snippet looks like this:


      The HttpServletRequest.getUserPrincipal() in the doGet() of ..../SSOServlet returns null.

      Am i missing something? Pls help.