Hi.
Am 08.07.2010 20:50, schrieb Caldarale, Charles R:
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?
Sorry was in a haste, forgot much more than this. :-/
- Tomcat 7.0.0
- Java 1.6 Update 20
- Windows XP SP3
- Wanted to use DB for Apache ODE 2.0 Beta
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.
That's how it was shown here: http://ode.apache.org/war-deployment.html
(that was [1] btw). What's the best solution for this?
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"7
What's that 7 hanging on the end?
May I typed it while pasting it into the message, but in the code
there's no 7.
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.
Where can I find them? "startup.bat" run didn't work. Tomcat is still
started in another window.
Greeting
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org