You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/07/26 18:00:28 UTC

DO NOT REPLY [Bug 11208] New: - form-based authentication failed to use the proper error page

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11208>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11208

form-based authentication failed to use the proper error page

           Summary: form-based authentication failed to use the proper error
                    page
           Product: Tomcat 4
           Version: 4.1.7
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: xin.guo@sun.com


For my form-based authentication, with a JNDIRealm, the server displays a 
default error page which reports "HTTP Status 403 - Access to the requested 
resource has been denied", instead of using the error page I specified. The 
following is my web.xml file for my sample application:

-------------------- start of xml file ----------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
    <!-- Modify this context parameter to set a new class to be the default
         expression language for the application. -->
    <context-param>
        <param-name>javax.servlet.jsptl.ExpressionEvaluatorClass</param-name>
        <param-value>org.apache.taglibs.jsptl.lang.spel.Evaluator</param-value>
    </context-param>

    <listener>
      <listener-class>com.iplanet.ldaptl.LDAPTL</listener-class>
    </listener>

    <taglib>
        <taglib-uri>http://java.sun.com/jsptl/ea/jx</taglib-uri>
        <taglib-location>/WEB-INF/jx.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>http://www.iplanet.com/ldaptl</taglib-uri>
        <taglib-location>/WEB-INF/ldaptl.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>http://www.iplanet.com/util</taglib-uri>
        <taglib-location>/WEB-INF/util.tld</taglib-location>
    </taglib>

    <security-constraint>
      <display-name>LDAP Gateway Security Constraint</display-name>
      <web-resource-collection>
         <web-resource-name>LDAP Gateway Application</web-resource-name>
	 <!-- Define the context-relative URL(s) to be protected -->
         <url-pattern>/jsp/lookmeup/*</url-pattern>
	 <!-- If you list http methods, only those methods are protected -->
      </web-resource-collection>
      <auth-constraint>
         <!-- Anyone with one of the listed roles may access this area -->
         <role-name>Gateway Admin</role-name>
      </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses form-based authentication -->
    <login-config>
      <auth-method>FORM</auth-method>
      <form-login-config>
        <form-login-page>/jsp/lookmeup/login.jsp</form-login-page>
        <form-error-page>/jsp/lookmeup/login_error.jsp</form-error-page>
      </form-login-config>
    </login-config>

    <!-- Security roles referenced by this web application -->
    <security-role>
      <role-name>Gateway Admin</role-name>
    </security-role>

</web-app>

--------------------------- end of xml file ----------------------------------
Other than that, the authentication process works ok, though I think there is
another bug for which I'll file another report. The example form-based login 
does work in my environment. 

I've tried my best to see if this is a misconfig with no luck, so please let me 
know if this is not a bug. This might be some special effect of the JNDIRealm 
object.

Thanks,

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>