Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to define datasource for servlets?  RSS feed

 
Vidya Moorthy
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Struts, you can define datasource in struts-config.xml. In my application using servlets and jsps, there are servlets which have to make connections using datasource. I was wondering if there was one central place where I could put this code instead of multiple places. Please let me know.
Thanks in advance
Vidya
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the web.xml configuration file.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!