File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes Tomcat 7 & j_security_check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Tomcat 7 & j_security_check " Watch "Tomcat 7 & j_security_check " New topic
Author

Tomcat 7 & j_security_check

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Hi

I have just been trying s little play around with Tomcat 7 and using the j_security_check security contraints with MySQL (see this tutorial: http://marakana.com/blog/examples/java/securing-java-web-applications-using-form-based-container-managed-security.html)

The problem is, when I goto the login.jsp and click 'submit' the first time, it just reloads the login.jsp page, the next time I get a 404 error:-
HTTP Status 404 - /webroot/j_security_check

type Status report

message /webroot/j_security_check

description The requested resource (/webroot/j_security_check) is not available.
Apache Tomcat/7.0.2


Has this functionality changed in Tomcat 7 to previous versions?

Any tips greatly appreciated.

Cheers in advance

KS
Pavel Tavoda
Greenhorn

Joined: Jan 25, 2012
Posts: 1
Yesterday I fight with same problem. Problem for me was that nothing was mapped to /j_security_check (servlet or page). I had only mapping with some servlets like '*.html', '*.jsp', '*.js', ... but none match /j_security_check. Because of this tomcat 7 decide not to start even filters which should be started '/*' (filter mapping isn't enough for tomcat 7). I add following line to web.xml and everything start to work:
 
jQuery in Action, 2nd edition
 
subject: Tomcat 7 & j_security_check