This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Configuring DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring DataSource" Watch "Configuring DataSource" New topic
Author

Configuring DataSource

alex reznik
Greenhorn

Joined: Jul 02, 2002
Posts: 27
Hello, everybody!
My config is as follows: win2k, tomcat 4.0.4, java 1.4, and the question is:
how do i configure a datasource so that i can call it from my .class file as follows:
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("myDataSource");
i have done some searches for the docs but they are not very clear and i am getting an error :
the datasource myDataSource is not configured within this Context, which i suppose references the server.xml file...
anyway, could someone gimme step by step, since my head is not working no more
Thanks,
alex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring DataSource