3 Replies Latest reply on Apr 18, 2008 2:01 PM by Marc

    j_securitycheck error 404

    Steve Tang Newbie

      I have a webapp running. When I try to access a protected page, it will take me to the login page. There, I enter the user name and password. When i submit the form, the login page is shown again. If i enter my login info again, it will take me to an error page with the following information:

      HTTP Status 404 - /j_security_check

      type Status report

      message /j_security_check

      description The requested resource (/j_security_check) is not available.
      JBossWeb/2.0.0.GA

      if, however, I refresh the page after the login page is shown for the second time, I am taken to the protected page. This issue is intermittent.

      I tried solving the problem by disabling caching but it still didnt work.
      This is what i have done so far but with no success:

      - Had all pages contain the following:
      <meta http-equiv="cache-control" content="no-cache">
      <meta http-equiv="Pragma" content="no-cache"/>
      <meta http-equiv="Expires" content="-1"/>

      - Followed the instructions to disable caching from
      http://wiki.jboss.org/wiki/Wiki.jsp?page=CachingLoginCredentials
      and
      http://wiki.jboss.org/wiki/Wiki.jsp?page=DisableCacheControl

      The following is snippet of my web.xml

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Protected Site</web-resource-name>
      <url-pattern>/webadmin.html</url-pattern>
      <http-method>DELETE</http-method>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <http-method>PUT</http-method>
      </web-resource-collection>

      <user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
      </user-data-constraint>

      <auth-constraint>
      <role-name>Admin</role-name>
      </auth-constraint>

      </security-constraint>

      <security-role>
      Admin Role
      <role-name>Admin</role-name>
      </security-role>

      <login-config>
      <auth-method>FORM</auth-method>
      <form-login-config>
      <form-login-page>/login.jsp</form-login-page>
      <form-error-page>/loginError.jsp</form-error-page>
      </form-login-config>
      </login-config>

      <welcome-file-list>
      <welcome-file>webadmin.html</welcome-file>
      </welcome-file-list>

      I'll appreciate any help i can get in order to get this issue resolved