Servlet Config Servlet Context Servlet config object - TopicsExpress



          

Servlet Config Servlet Context Servlet config object represent single servlet It represent whole web application running on particular JVM and common for all the servlet Its like local parameter associated with particular servlet Its like global parameter associated with whole application It’s a name value pair defined inside the servlet section of web.xml file so it has servlet wide scope ServletContext has application wide scope so define outside of servlet tag in web.xml file. getServletConfig() method is used to get the config object getServletContext() method is used to get the context object. for example shopping cart of a user is a specific to particular user so here we can use servlet config To get the MIME type of a file or application session related information is stored using servlet context object.
Posted on: Wed, 26 Mar 2014 12:14:05 +0000

© 2015