This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: web-xml entry example for database init parameters?
 
Similar Threads
deploying .war in web
New Career in Java Development/Programming
VS.NET 2003 Example App is somewhat architecturally similar to SCEA app
Proficiency in java before learning XML?
XML and Databases