• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ServletConfig Interface

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

What's the ServletConfig Interface used for?In init method of servlet what the Servletconfig object contains?

Thanks
Rakesh
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best place to learn the answer is in the JavaDocs provided in any Tomcat installation. There are also a number of good tutorials on the web, do a google search for "Java Servlet Tutorial"
Bill
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bills right, you need to go and read about servlets.

But in a nutshell, it essentially allows you to retrieve configuration parameters from the web.xml file, for your particular servlet. (Each servlet in a web app can be initialized differently). Hence the name, "Servlet Configuration" shortened to ServletConfig.

As opposed to the ServletContext interface, which really represents the servlet container to any servlet in the web app. The object that implements the ServletContext will be the same for all servlets within a web app, and so all servlets can get a copy of it and it will be the same for all of them.

I would recommend "SCWCD Exam Study Guide" by Deshmukh and Malavia. It's a classic now for studying for the SCWCD exam, but it's very useful for general brushing up on servlets and JSPs.

Jeff Walker
 
Pandurangan Rakesh
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Lot..I am clear now
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic