0 Replies Latest reply on Aug 11, 2014 9:50 PM by Jon-Eric

    Login page auth failure shows error page instead of popup error


      I have a login.jspx page (unbounded) with user, password fields and action button doLogin.  When I created this page it would display a popup upon authentication failure.  Sometime, somehow this page no longer displays popup error (af:message?) on the login page and instead sends me to the unbounded task flow error page.  While I want to preserve the error page to handle uncaught exceptions I'd like login failures to display popup on the login page to allow simple retry.


      I appreciate any constructive input!


      Here is my doLogin method:

          public String doLogin() {

              String un = getUserName();

              byte[] pw = getPassword().getBytes();

              FacesContext ctx = FacesContext.getCurrentInstance();

              HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();

              try {

                  if (un.length() == 0 || pw.length == 0) {

                      throw new FailedLoginException();



                  Subject subject = Authentication.login(new URLCallbackHandler(un, pw));

                  weblogic.servlet.security.ServletAuthentication.runAs(subject, request);


                  String loginUrl = "/adfAuthentication";

                  HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();

                  sendForward(request, response, loginUrl);

              } catch (Exception e) {




              return null;