SERVLET API
by siti nur afiqah
1. Sevlet Lifecycle
1.1. 1.Loading Servlet Class
1.1.1. When first request for the servlet is received by the Web Container.
1.2. 2.Servlet instance creation
1.2.1. Servlet instance is created only once in the life cycle
1.3. 3.init() method
1.3.1. called by the Web Container on servlet instance to initialize the servlet
1.4. 4.service() method
1.4.1. each time the request for servlet is received
1.4.1.1. doGet()
1.4.1.2. doPost()
1.5. 5.destroy() method
1.5.1. before removing servlet instance, giving it a chance for cleanup activity
2. Architecture of Servlet
2.1. 1. User request a web application.
2.2. 2.Receive the request and searching for web application.
2.3. 3. Server respond to servlet as the user request
2.4. 4. Servlet found the request.
2.5. 5. Servlet found the request.
2.6. 6. Server respond to web browser what user respond
3. 1.Nur A’tifah Binti Mohd Nizam 17DDT17F1004 2.Siti Nur Afiqah Binti Mohd Nazri 17DDT17F1016 3.Nurul Hazirah Binti Abdul Hamid 17DDT17F1018 4.Umairoh Shakiroh Binti Kahar Mubakkar 17DDT17F1020 5.Farah Nabila Binti Aznoor Hisham 17DDT17F1022
4. Servlet API
4.1. package represent interface and classes
4.1.1. javax.servlet
4.1.1.1. responsible for respond only
4.1.1.2. for static web page
4.1.2. javax.servlet.http
4.1.2.1. responsible for http request only
4.1.2.2. for dynamic web page