• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Configuring DataSource

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic