1 Reply Latest reply on Nov 14, 2005 9:20 AM by Ales Justin

    Tomcat authentification and request parameters

    Ales Justin Master

      I'm using JBossPortal2.0.
      This is its web.xml security part:

       <realm-name>JBoss Portal</realm-name>

      And when I submit my form request to the following url: /portal/auth/enlogin it gets intercepted by Tomcat and redirects me to the login.jsp.

      But the thing is that the request paarmeters are not carried along, since my username parameter is null.

      login.jsp code
       String username = request.getParameter("username");
       System.out.println("Username: " + username);
       String password = request.getParameter("password");
       if (username != null && password != null) {
       String url = "j_security_check?j_username=" + username + "&j_password=" + password;
       String redirectUrl = response.encodeRedirectURL(url);
       } else {
       // String home = (String)request.getAttribute(CoreConstants.REQ_ATT_CONTEXT_PATH);
       String home = "portal";
       String portalUrl = response.encodeRedirectURL(home);
       response.sendRedirect("/" + portalUrl);

      and my form code
       <form id="loginform" class="login" name="loginform" action="/portal/auth/enlogin" method="post">
       <input type="text" name="username" title="<s:message code="username"/>" alt="<s:message code="username"/>"/><input type="password" name="password" alt="<s:message code="password"/>" title="<s:message code="password"/>"/>

      Is this normal behaviour?
      Since it used to work before I changed my JBossAS (currently running build from CVS).

      Rgds, Ales