MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

Java Servlet Programing Laungage

Java Servlet Projects

Servlet Project 3

Java Servlet : Methods of ServletConfig interface
Previous Home Next
getServletContext() is used to obtain the reference of sevletContext object.

	public ServletContext getServletContext();
getInitParameter() is used to obtain the value of initialization parameter.


	public String getInitParameter(String name);
getInitParameterNames() returns an enumeration for the name of initialization parameters stored in ServletConfig.

	public Enumeration getInitParameterNames();
Similarities and Difference between servletContext and ServletConfig


  1. Both these interfaces are in same javax.servlet package
  2. The vendors of Web Server (which support servlet technology) provide the implementation classes for theses two interfaces

Differences :

  1. Only one ServletContext object will existed for one Web Application . One Servlet Configuration object existed per a Servlet in a Web Application.
  2. A ServletContext object will be shared by all the Servlets which are present in Web Application . Every Servlet of a Web Application contain individually a Servlet Configuration object.
  3. A ServletContext defines a set of methods that a Servlet uses to communicate with its Servlet Container . The ServletConfig is to pass configuration information to a Servlet . The Server passes an object that implements the ServletConfig interface to the Servlet's init() method
  4. ServletContext object is used to access the Context parameters specified in web.xml file. A Servlet Config object is used to access the Initialization parameters specified for particular Servlet in a web.xml file.
Previous Home Next