Hi All,
I'm using tomcat 5.5.12 and i want use authentification with JDBC realm. I'm using netbeans 4.1 and firebird.
I had got added to the file web.xml:

<security-constraint>
     <display-name>Example Security Constraint</display-name>
     <web-resource-collection>
        <web-resource-name>Protected Area</web-resource-name>
         <!-- Define the context-relative URL(s) to be protected -->
        <url-pattern>/*</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>manager</role-name>
        <role-name>tomcat</role-name>
         <role-name>role1</role-name>
     </auth-constraint>
   </security-constraint>

   <!-- Default login configuration uses form-based authentication -->
   <login-config>
     <auth-method>FORM</auth-method>
     <realm-name>Example Form-Based Authentication Area</realm-name>
     <form-login-config>
       <form-login-page>/login.jsp</form-login-page>
       <form-error-page>/error.jsp</form-error-page>
     </form-login-config>
   </login-config>

   <security-role>
     <role-name>role1</role-name>
   </security-role>
   <security-role>
     <role-name>tomcat</role-name>
   </security-role>

Following the tomcat docs example. If i try to access the application, everything works fine. So, i put the JDBC driver for firebird on <TOMCAT-HOME>/commom/lib, and added to server.xml as follow (again like the tomcat docs example):

     <Realm  className="org.apache.catalina.realm.JDBCRealm"
            driverName="org.firebirdsql.jdbc.FBdriver"
         connectionURL="jdbc:firebirdsql:localhost/3050:/DB/Call.fdb"
        connectionName="sysdba" connectionPassword="masterkey"
             userTable="USER" userNameCol="TXT_USER" userCredCol="TXT_PASS"
         userRoleTable="ROLE_USER" roleNameCol="TXT_ROLE" />

In this case the netbeans ask me by tomcat administrator password, and tomcat is not loaded. Besides, the tomcat initiation log show a lot of database access exceptions. Is strange because i make a test with the same driver installing it in netbeans and works fine! does anyone can help me? All the tables are populated with sysdba and admin users, and the roles are created too.

Best regards



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

Reply via email to