Hallo zusammen,
ich habe folgendes Problem:
bei einem Projekt versuche ich eine Automatischen Benutzerlogin über web.xml und context.xml vom Apache Server durchführen zu lassen.
Die web.xml sieht so aus:
und meine context.xml:
natürlich habe ich die <variablen> sinvoll ersetzt. Leider bekomme ich keinen Zugriff hin. Der Tomcat liefert immer die Fehlermeldung:
weis einer hier vielleicht woran das liegen könnte? Oder mache ich an den xml definitionen was falsch?
ich habe folgendes Problem:
bei einem Projekt versuche ich eine Automatischen Benutzerlogin über web.xml und context.xml vom Apache Server durchführen zu lassen.
Die web.xml sieht so aus:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>backend implementierung</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>backend</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name></auth-constraint>
</security-constraint>
<security-role>
<description>Administrator</description>
<role-name>admin</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>JDBCRealm</realm-name></login-config>
</web-app>
und meine context.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://inet00.de:3306/"
connectionName="<user>" connectionPassword="<pw>"
userTable="user" userNameCol="email" userCredCol="passwort"
roleNameCol="rolle" realmName="JDBCRealm" resourceName="<dbName>"></Realm>
</Context>
natürlich habe ich die <variablen> sinvoll ersetzt. Leider bekomme ich keinen Zugriff hin. Der Tomcat liefert immer die Fehlermeldung:
Code:
SCHWERWIEGEND: Exception opening database connection
java.sql.SQLException: org.gjt.mm.mysql.Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:693)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:771)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
weis einer hier vielleicht woran das liegen könnte? Oder mache ich an den xml definitionen was falsch?