bojan 01/09/27 01:23:06
Modified: src/doc mod_jk-howto.html
Log:
Added j_security_check FAQ
Revision Changes Path
1.13 +63 -1 jakarta-tomcat/src/doc/mod_jk-howto.html
Index: mod_jk-howto.html
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/doc/mod_jk-howto.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- mod_jk-howto.html 2001/08/02 17:15:47 1.12
+++ mod_jk-howto.html 2001/09/27 08:23:06 1.13
@@ -892,8 +892,70 @@
</blockquote>
Note: The above steps assume that you downloaded the Apache source and
placed it in your /usr/local/src directory.
-<br>
+<h3>
+Q. Why doesn't my form authentication work? I'm getting similar error messages
+from Apache:</h3>
+
+<table class="inlinetable"><tr><td class="inlinetd">
+<blockquote><pre>Not Found
+The requested URL /login/j_security_check was not found on this server.
+</pre></blockquote>
+</td></tr></table>
+
+A. If you used manual configuration such as:
+
+<table class="inlinetable"><tr><td class="inlinetd">
+<blockquote><pre>
+JkMount /*.jsp ajp13
+</pre></blockquote>
+</td></tr></table>
+
+or
+
+<table class="inlinetable"><tr><td class="inlinetd">
+<blockquote><pre>
+JkMount /*.vm ajp13
+</pre></blockquote>
+</td></tr></table>
+
+mod_jk will pass requests for all JSP or Velocity pages to Tomcat. If some of
+those pages are configured as login and error pages in web.xml:
+
+<table class="inlinetable"><tr><td class="inlinetd">
+<blockquote><pre>
+<login-config>
+ <auth-method>FORM</auth-method>
+ <realm-name>Protected</realm-name>
+ <form-login-config>
+ <form-login-page>/login/login.vm</form-login-page>
+ <form-error-page>/login/error.vm</form-error-page>
+ </form-login-config>
+</login-config>
+</pre></blockquote>
+</td></tr></table>
+
+there is also another, somewhat hidden request involved in the authentication
+process: <strong>/login/j_security_check</strong>, which is the 'action' of the
+form specified within <strong>login.vm</strong> and <strong>error.vm</strong>
+like this:
+
+<table class="inlinetable"><tr><td class="inlinetd">
+<blockquote><pre>
+<form method="post" action="j_security_check">
+</pre></blockquote>
+</td></tr></table>
+
+This request is not mapped. This following fixes the problem:
+
+<table class="inlinetable"><tr><td class="inlinetd">
+<blockquote><pre>
+JkMount /*.vm ajp13
+JkMount /login/j_security_check ajp13
+</pre></blockquote>
+</td></tr></table>
+
<hr>
+
<h2>
<a NAME="s11"></a>Credits</h2>
This document was originally created by