This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are ServletConfig, ServletContext ?

 
Jess Ishasder
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know much about the differences between two?
Under what situations that I should these two classes?
 
indira mandapati
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 instance.info can be placed in servletContext instance inorder to be shared by entire webapplication.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic