aspose file tools*
The moose likes Servlets and the fly likes web-xml entry example for database init parameters? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "web-xml entry example for database init parameters?" Watch "web-xml entry example for database init parameters?" New topic
Author

web-xml entry example for database init parameters?

Rakesh Mehra
Ranch Hand

Joined: Nov 20, 2007
Posts: 31
what should be the web-xml structure specifyng the database initialization parametrs? An example web-xml would be useful.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
This question is not exactly clear. Are you asking how you sepcify initialization parameters via your servlet in web.xml?


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Rakesh Mehra
Ranch Hand

Joined: Nov 20, 2007
Posts: 31
Originally posted by Bosun Bello:
This question is not exactly clear. Are you asking how you sepcify initialization parameters via your servlet in web.xml?


Yes,iwant to know
how you sepcify initialization parameters via your servlet in web.xml?
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Heres an example



You can get the values of this parameter using ServletConfig.

String interval = config.getInitParamater("timer.refresh.interval");


[Servlet tutorial] [Servlet 3.0 Cook Book]
Rakesh Mehra
Ranch Hand

Joined: Nov 20, 2007
Posts: 31
Originally posted by sudhir nim:
Heres an example



You can get the values of this parameter using ServletConfig.

String interval = config.getInitParamater("timer.refresh.interval");



what should we mention in web-xml w.r.t database connection?
 
 
subject: web-xml entry example for database init parameters?