Hello,
I have no more ideas...
My problem is JDBC Realm:
OS: Linux Suse 7.x
Database: Interbase and Interclient 6.01
I have a website /texdb which is "normally" configured like I have found it
in all the user-lists:
mod_kj.conf contains:
JkMount /texdb/servlet/* ajp13
JkMount /texdb/*.jsp ajp13
JkMount /texdb/j_security_check ajp13
Tomcat seems to find j_security_check.
My web.xml is rather simple:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<!-- TWR 13/05/01 Version 0.01 -->
<web-app>
<session-config>
<session-timeout>1800</session-timeout>
</session-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>TexDB App</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/texdb/txdb/*</url-pattern>
<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>admin</role-name>
<role-name>user</role-name>
<role-name>mainuser</role-name>
</auth-constraint>
</security-constraint>
<!-- Form-based login -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>JDBC</realm-name>
<form-login-config>
<form-login-page>/index.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
</web-app>
I have a database which is configured as the JDBCRealm-howto recommends, i.e.
user_name, user_pass, user_roles etc. the relevant part of server.xml are:
...
<!-- JDBC Realm for texdb -->
<RequestInterceptor
className="org.apache.tomcat.request.JDBCRealm"
debug="99"
driverName="interbase.interclient.Driver"
connectionURL="jdbc:interbase://localhost/opt/databases/authority.gdb"
connectionName="developer"
connectionPassword="developer"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
roleNameCol="role_name" />
...
At startup jakarta seems to find the database and there is no error log. I
started jakarta and the apache. When trying to connect to
http://localhost/texdb/txdb/<anyfile> it totally ignores the authority
constraints and shows me the page!
When starting http://localhost/texdb/index.jsp it finds the page but whatever
I insert in the first time as username and password the error.jsp is called
moving me inside the protected area! The second and following times I can
insert username and password whatever I want it totally ignores the input and
shows me index.jsp.
Oh my God I spent hours and hours but I don't find a solution. What the hell
is wrong??? What else can I try?
Thanks very,very much in advance
Thomas
By the way: Interbase and Interclient seem to work. I can access the
authority.gdb via JDBC Explorer. - And It does not work under Windows NT, too.