This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes is it do-able : creating Tomcat datasource without access to tomcat admin console? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "is it do-able : creating Tomcat datasource without access to tomcat admin console?" Watch "is it do-able : creating Tomcat datasource without access to tomcat admin console?" New topic
Author

is it do-able : creating Tomcat datasource without access to tomcat admin console?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Is it possible to make a data-source without admin console ?
I mean by defining the data-source in web.xml or in Context.xml (i think
i read somewhere that we could put context.xml into meta-inf folder and
it will act like Context definition in admin console).

is it mandatory that Tomcat shared library folder contain my database
jdbc driver to have data-source ?
I mean can we bundle , our JDBC driver inside war file and define the
data-source in war file too ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Yes, and Yes (with one correction).

You can create a datasource without the admin app.
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

If Tomcat is to manage the database connections, then it need access to the drivers.
The {tomcat install}/common/lib directory is where libraries that are to be shared between the appserver (Tomcat) and the applications go.
The {tomcat install}/shared/lib is for libraries that are to be shared beween applications but not Tomcat itself.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: is it do-able : creating Tomcat datasource without access to tomcat admin console?
 
Similar Threads
Cannot create JDBC driver of class '' for connect URL 'null'
How to deploy WAR file in WebSphere Applcation Server 7
passing session values between two web application
JNDI in Servlets
Problems setting up website with context.xml inside META-INF