PDA

View Full Version : SOLUTION: Apache and j_acegi_security_check file not found


smccrory
Sep 15th, 2004, 10:08 PM
No big revelation - just posting it in case someone else runs into the same problem. My Acegi-protected app was working great inside of Eclipse and Tomcat 5, but when I deployed it to my QA environment (also Tomcat 5), I couldn't login. Was getting a 404 (File not found) error on j_acegi_security_check. The answer (and solution) turned out to be simple.

In eclipse, I'm actually testing againt Tomcat itself, while in QA I'm going through Apache and mod_jk to get to Tomcat. Seems that I forgot to update my mod_jk workers2.properties so that it would recognize not only JSPs and servlets, but also j_acegi_security_check. Adding this and restarting Apache did the trick:


[uri:/myapp/j_acegi_security_check]
info=Map Acegi's login URL


HTH,
Scott

rwspeh
Dec 22nd, 2004, 11:34 AM
I tried this but it is not working for me.

I have set my application up in Tomcat as the default application.
I access my application by http://localhost

Putting [uri:/j_acegi_security_check] in my workers2.properties file does not work. Apache will hand off all request for jsp's to Tomcat due to the
[uri:/*.jsp] in my workers2.proerties. However the j_acegi_security_check link will not work.

Please help.

witalis3
Dec 23rd, 2004, 05:42 AM
Mayby You must change Apache conf:
JkMount /your_app/*.jsp to JkMount /your_app/*
or
change j_acegi_security_check to j_acegi_security_check.jsp in your applicationContext.

Witek.

aaron8tang
Jan 27th, 2005, 08:26 PM
Mayby You must change Apache conf:
JkMount /your_app/*.jsp to JkMount /your_app/*
or
change j_acegi_security_check to j_acegi_security_check.jsp in your applicationContext.

Witek.

YES!! I tried Witek's latter solution, it works under apache+resin! change j_acegi_security_check to j_acegi_security_check.jsp in applicationContext and login.jsp

nsreeni
Jul 18th, 2006, 02:57 AM
Hi,
I am using Sun java app server 8.2 to run my simple Spring application with Acegi security but I am getting an error as below
HTTP Status 404 - /Sample/j_acegi_security_check.jsp

can anybody help in this regard?