Hello all,

I have seen your various posting regarding JDBCRealm, IMHO you seem to
be an expert in this topic. I have configured my server.xml and web.xml
properly to throw me to login.jsp page whenever I try to access a
protected page. But the problem is that when I submit log in on jsp page
it does not do anything, it shows me the login page again. And the
httpd.log file shows me an error saying
/var/tomcat/webapps/example/jsp/security/login/null  not found

my server.xml entries are as follows

<RequestInterceptor
           className="org.apache.tomcat.request.JDBCRealm"
           debug="99"
       driverName="com.sybase.jdbc.SybDriver"
      connectionURL="jdbc:sybase:Tds:************/testdb"
           connectionName="test"
           connectionPassword="test01"
       userTable="t_user_profile"
           userNameCol="usernames"
           userCredCol="userpasswd"
       userRoleTable="t_roles"
           roleNameCol="roles" />

The database is set up exactly as shown

my web.xml has following entries

<security-constraint>
      <web-resource-collection>
         <web-resource-name>Protected Area</web-resource-name>
     <!-- Define the context-relative URL(s) to be protected -->
         <url-pattern>//jsp/security/protected//*</url-pattern>
         <url-pattern>/secure/checkMerchant.cgi</url-pattern>
     <!-- If you list http methods, only those methods are protected -->
     <http-method>DELETE</http-method>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
     <http-method>PUT</http-method>
      </web-resource-collection>
      <auth-constraint>
         <!-- Anyone with one of the listed roles may access this area -->
         <role-name>allok</role-name>
     <role-name>readonly</role-name>
      </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses BASIC authentication -->
    <!--
    <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>Example Basic Authentication Area</realm-name>
    </login-config>
    -->

    <!-- Form-based login is enabled by default.  If you wish to
         try Basic authentication, comment out the <login-config>
         section below and uncomment the one above. -->
    <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>JDBC</realm-name>
      <form-login-config>

<form-login-page>/examples/jsp/security/login/login.jsp</form-login-page>

<form-error-page>/examples/jsp/security/login/error.jsp</form-error-page>
      </form-login-config>
    </login-config>

What else I need to do to make JDBCRealm working. I made the JkMount 
entry in mod_jk.conf file


Thanks and Regards

-- 
Tony


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to