WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 27.04.2003, 16:44   #3
RaistlinMajere
Inventar
 
Registriert seit: 06.04.2001
Alter: 45
Beiträge: 2.343


Standard

ok, der richtige treiber dürfte das sein, danke.
nur hab ich jetzt noch das problem, daß ich nicht weiß, wie ich den richtigen treiber einbauen soll.
das ganze soll nämlich eine JSP sein, normalerweise würde ich diesen ja einfach zum klassenpfad hinzufügen, aber wie funzt das hier?

aus der readme werd ich nicht ganz schlau.

Zitat:
Put mysql-connector-java-3.0.7-stable-bin.jar in your classpath, either by adding the
FULL path to it to your CLASSPATH enviornment variable, or putting it
in $JAVA_HOME/jre/lib/ext.

If you are using a servlet engine or application server, you will have
to read your vendor's documentation for more information on how to
configure third-party class libraries, as most application servers
ignore the CLASSPATH environment variable. If you are developing
servlets and/or JSPs, and your application server is J2EE-compliant,
you should put the driver's .jar file in the WEB-INF/lib subdirectory
of your webapp, as this is the standard location for third party
class libraries in J2EE web applications. You can also use the
MysqlDataSource, MysqlConnectionPoolDataSource or MysqlXADataSource
classes in the com.mysql.jdbc.jdbc2.optional package, if your J2EE
application server supports/requires them. MysqlDataSource supports the
following parameters (through standard "set" mutators):

user
password
serverName (see the next section about fail-over hosts)
databaseName
port

If you are going to use the driver with the JDBC DriverManager, you would use
"com.mysql.jdbc.Driver" as the class that implements java.sql.Driver.

You might use this name in a Class.forName() call to load the driver:

Class.forName("com.mysql.jdbc.Driver").newInstance ();

To connect to the database, you need to use a JDBC url with the following
format ([xxx] denotes optional url components):

jdbc:mysql://[hostname][,failoverhost...][ort]/[dbname][?param1=value1][&param2=value2].....
das hinzufügen ins $JAVA_HOME/jre/lib/ext hab ich schon probiert, bringt aber leider nix. irgendwie muß ich ja den treiber wohl auch im quelltext einbinden.
____________________________________
"Life is like a box of rockets," said the Marine. "You never know what you´re gonna ret."
Then he pulled the trigger of his BFG9000.
RaistlinMajere ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 00:33 Uhr.


Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag