• Post Reply Bookmark Topic Watch Topic
  • New Topic

Configuring DataSource on Tomcat5.0  RSS feed

 
app yadav
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Can any one pls tell me how to configure datasource on tomcat 5.0.
I've written following code in my servlet

Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("jdbc/MyServlet");

and from administrator i've done the setting for datasource.
JNDI name for datasource is:jdbc/MySevlet

It gives me Exception:
An IOException was thrown.javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

Can any one pls tell me what's wrong in this.

Thanks in advance.
Aparna
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Apache/Tomcat forum.

Dave.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!