> From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de]
> Subject: Connecting Tomcat to a database
> 
> I need t connect Tomcat to a database

What version of Tomcat?  What JVM?  What platform are you running Tomcat on?

> server.xml (inside the <Host>-Element):
> ------------------------------------------------------
> <Context path="/TestDB" docBase="TestDB" debug="5" reloadable="true"

Extremely bad practice to put <Context> elements in server.xml.  The proper 
location is in the webapp's META-INF/context.xml file.  When you do so, remove 
the path and docBase attributes, since they're not allowed when you have 
<Context> in a proper location.  Also, the debug attribute hasn't been used in 
years, so get rid of that as well.

> <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"7

What's that 7 hanging on the end?

> After I did this, Tomcat didn't work anymore. I even can't 
> debug it, because the Tomcat window dissapears to fast.

Look in the Tomcat logs.  Also start Tomcat with "catalina.bat run" (or 
"catalina.sh run", depending on the platform - which you didn't tell us); this 
will run Tomcat in the current command window.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to