This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes What are ServletConfig, ServletContext ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What are ServletConfig, ServletContext ?" Watch "What are ServletConfig, ServletContext ?" New topic

What are ServletConfig, ServletContext ?

Jess Ishasder

Joined: Feb 19, 2002
Posts: 21
I don't know much about the differences between two?
Under what situations that I should these two classes?
indira mandapati

Joined: Feb 15, 2002
Posts: 14
Servlet container uses ServletConfig object to pass the information during its initialization.ServeltConfig object will have servletContextObject.
You can get initialization params and ServeletContext object from ServeletConfig object.
ServeltContext Object is used by servelets to communicate with servelt container.look in api
to see the methods.
A webapplication( having servelts,beans,jsp)will have one servletContext can be placed in servletContext instance inorder to be shared by entire webapplication.
I agree. Here's the link:
subject: What are ServletConfig, ServletContext ?
Similar Threads
The difference of start rmiregistry by API and Command line
difference between throw and throws
Unexpected Exception
Man awarded 3 BILLION in smoking case