JSP (Java Server Pages) Lecture # 5
Breif detail lecture about the JSP Servlets with example code the tutorial thing such as how to create, deploy etc etc
2. What is Servlet?
A class used to extend the capabilities of servers that
host applications accessed via a request-response
programming model.
3. Servlet handles request and response objects.
User requests by Get of Post method.
Package “javax.servlet.http”
Servlet contains two main Interfaces
HttpServletRequest
HttpServletResponse
Creates new thread for each servlet and calls servelt
services.
7. How to Create Servlet
Create Web project as normal(as we did while
creasting JSP project)
Right click on Source Packages and create new
servlet.
Set action to servlet in first page in form tag(only
name with no extension)
Run project
8. Practice
Make Website Counter using servlet…
Servlet to send form to be filled by user and again
returned to same servlet.