File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes DataSource in Tomcat 5.5 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 "DataSource in Tomcat 5.5" Watch "DataSource in Tomcat 5.5" New topic
Author

DataSource in Tomcat 5.5

Johnny Belab
Greenhorn

Joined: Oct 05, 2005
Posts: 12
Why defining Datasource to Tomcat is so hard...
I have tried couple of different ways to do it but it does not work.
Could someone please tell how to define e.g. Datasource in Tomcat 5.5.x that supports Oracle.

Doing it it in the way Tomcat's documentation says does not work.
I have also tried to define it to NetBeans 4.1 embedded Tomcat but it does not work either.

I would be very pleased to have information or sample configurations.

Broost!
Jon Bates
Greenhorn

Joined: Oct 06, 2005
Posts: 8
Hello,

I am no expert, but since noone else has posted, Ill try my best

1) Goto the admin console in tomcat. For the localhost, you can try http://127.0.0.1/admin and log in

2) select "Data Sources" from the left hand pane, and wait for the page to load.

3) in "Data Source Actions" on the top right of the screen, select "Create New DataSource"

4) type in the JNDI source name you want to associate with the connection pool, add the class name (as if calling `class.forname(...)' when creating a normal connection) and anything else you like.

5) finally, save and commit changes.

This should give you a connection pool which can be used in the standard manner. You will need to add your DB connection jar to the tomcat_dir\common\lib directory (I think, but i may get a slap on the wrists!)

Regards,

Jon Bates
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DataSource in Tomcat 5.5
 
Similar Threads
Tomcat 5.5.28 JSF exception
using oracle thin diver, tomcat 5.5.9
Problem using Spanish characters in Ajax response.
Look up DataSource in JBuilder/Tomcat
Tomcat 5.5.9 admin and Datasources