[jboss-user] [Security & JAAS/JBoss] - j_securitycheck error 404

kokhang do-not-reply at jboss.com
Tue Jan 15 18:39:18 EST 2008


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


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120262#4120262

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120262



More information about the jboss-user mailing list