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 : Package javax.servlet, Life Cycle and Non Life Cycle Methods of Servlet Interface
Previous Home Next

javax.servlet and its subpackages:

javax.servlet and javax.http.servlet are two packages which provided interface and classes for writing servlets.These contain classes and interfaces of servlet API.At the core of servlet API is an interface named javax.servlet.Servlet.This interface provides life cycle methods of a servlet.


Life Cycle Method of servlet
  1. init(): This method is invokes only one's just after a servlet object is created.It is used by the server to provide the reference of an object of type ServletConfig to the servlet.javax.servlet.ServletConfig is an interface of servlet API implementation of which is provided by server vendor.
    	public void init(ServletConfig config);
  2. service(): This method is invoked by the server each time a request for the servlet is received.It is used by the application developer to process request and generate dynammic contents.
    public void service (ServletRequest request,
    	ServletResponse response)
    throws ServletException,IOException ;
Non Life Cycle Method of Servlet Interface
  1. getServletConfig(): It is used by the application developers to obtain the reference of ServletConfig object from the servlet.
    	public ServletConfig getServletConfig();
  2. getServletInfo(): This method is used by the application developer to describe their servlet's.
    	public String getServletInfo();
Previous Home Next