Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to define a JDBC resource ref for a database in web.xml?  RSS feed

 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the logical name of the resource is "work",
which one is the correct declaration:
1)java:comp/env/jdbc/work
2)java:comp/env/work
Thanks.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it is defined as "work" in the web.xml then you would access it in JNDI as java:comp/env/work.
By convention you should define as jdbc/datasourceName in the web.xml.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!