• Post Reply Bookmark Topic Watch Topic
  • New Topic

DB configuration place  RSS feed

 
S Shehab
Ranch Hand
Posts: 492
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys ,

i need to take your opinion in this issue , after developing j2ee application (servlets and jsps) used to connect to DB to generate some reports, i put the configurations of the DB in the WEB.xml in <context -param> , after finishing the development and going production they asked me to make the DB configurations in a place rather web.xml for more security for the application..
So any recommendations?
 
S Shehab
Ranch Hand
Posts: 492
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys ,

Any ideas ?
 
Vinod Vinu
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you can put your Database Configuration in the file called 'server.xml'
As soon as your server gets started, it automatically connects with your designated DB.
sample code is below which you can refer:-


enjoy

 
S Shehab
Ranch Hand
Posts: 492
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinod Vijay wrote:Well you can put your Database Configuration in the file called 'server.xml'
As soon as your server gets started, it automatically connects with your designated DB.
sample code is below which you can refer:-


enjoy



Thanks for your idea , but i think your idea will be applicable only if i'm using tomcat server , but what if i will use glassfish because i cant find this file in the glassfish folders..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!