Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Secure Login redirects to 404/favicon

843838Jul 4 2007 — edited Dec 14 2007
Hi,

Im implementing a secure login using j_security_check (validating users against our active directory). This is working and logging users into our site, however randomly it seems, when users login they are forwarded to either http://localhost/j_security_check/ or http://localhost/favicon.ico both resulting in 404 errors. This does still log the user in though.

Does anyone know how to solve this problem?

A sample from our web.xml is shown below:
<servlet-mapping>
	<servlet-name>default</servlet-name>
	<url-pattern>/favicon.ico</url-pattern>
</servlet-mapping>

<security-constraint>
	<web-resource-collection>
		<web-resource-name>Login</web-resource-name>
		<url-pattern>/*</url-pattern>
	
	    <http-method>GET</http-method>
	    <http-method>POST</http-method>
	    <http-method>PUT</http-method>
	    <http-method>DELETE</http-method>
	</web-resource-collection>
	<auth-constraint>
		<role-name>*</role-name>
	</auth-constraint>
</security-constraint>


<login-config>
       <auth-method>FORM</auth-method>
        <realm-name>YourWebApp Protected Area</realm-name>
        <form-login-config>
                <form-login-page>/WEB-INF/security/login.jsp</form-login-page>
                <form-error-page>/WEB-INF/security/error.jsp</form-error-page>
        </form-login-config>
</login-config>
Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2008
Added on Jul 4 2007
2 comments
194 views