IT8501 WT Topic23
IT8501 WT Topic23
Visual PPT
Kinesthetic Workbook
@Visual: What are you going to show the students to learn in the class? – Example: PPT, a
video with or without audio, a model, a demonstration, etc.
*Audio: What are you going to make the student listen in the class?
Example: You live explanation, a recorded audio, a video with audio
#Kinesthetic: What are you going to make the students do physically in the class?
Example: Use a workbook and make them work on it and learn by doing
_______________________________________________________________
$ as per the course plan and will vary based on the credits
STEP 2: ACQUISITION
(The subtopics under the main topic being handled are listed. Under each sub topic, the entire detail is to be
prepared. This helps in handling the class with focus and confidence).
Servlet technology is used to create a web application (resides at server side and generates a dynamic
web page).Servlet technology is robust and scalable because of java language. Before Servlet, CGI
(Common Gateway Interface) scripting language was common as a server-side programming
language. However, there were many disadvantages to this technology. We have discussed these
disadvantages below. There are many interfaces and classes in the Servlet API such as Servlet,
GenericServlet, HttpServlet, ServletRequest, ServletResponse, etc.
1. Client
In this architecture, the web browser acts as a Client. Client or user connected with a web browser.
The client is responsible for sending requests or HttpRequest to web server and processing responses
received by the Web server.
2. Web Server
Web server controls how web user access hosted files and its responsible for processing user request
and responses. Here server is a software it understand URLs and HTTP protocol. Whenever browser
need to host file on the webserver process client request using HTTP request, if it finds requested file
sends it back to browser through HTTP Response. There are two types’ web servers Static and
Dynamic webservers.in static web server sends the file as it is but in dynamic webserver hosted file is
updated before it is sent to the browser.
3. Web Container
Web container is the component in the webserver it interacts with Java servlets. A web container is
responsible for managing the lifecycle of servlets and it also performs the URL mapping task. Web
container handles the requests of servlets, JSP and other files at the server-side. The important tasks
performed by servlets are loading and unloading servlets, creating and managing requests and
response objects and performs the overall tsk of servlet management.
Following are the steps how servlet request has been processed consider the above diagram.
The client sends a request.
Web Server accepts the request and forwards it to the web container.
Web container searches web.xml file for request URL pattern and gets the address of the
servlet.
If the servlet is not yet instantiated it will be instantiated and initialized by calling the init()
method.
The container calls public service() by passing ServletRequest and ServletResponse objects.
Public service() method typecast ServletRequest and ServletResponse object to
HttpServletRequest and HttpServletResponse objects respectively.
Public service() method calls protected service().
Protected service() method checks the client request & corresponding do___() method is
called.
Request is handled by sending the result generated by do___() to the client.
3.9.2 Advantages of Servlet Architecture
Below are some important advantages of the servlet as follows:
Servlets are server independent, as they are compatible with any web server. Compared to
other server-side web technologies like ASP and JavaScript these are server-specific.
Servlets are protocol-independent i.e. it supports FTP, SMTP, etc. Mainly it provides extended
support to HTTP protocol functionality.
Servlets are persistent because it remains in memory until explicitly destroyed this helps in
several request processing and one database connection can handle several database requests.
Servlets are portable since the servlets are written in java they are portable and supports any
web server.
Faster in execution, servlets are compiled into byte code execute more quickly compared to
other scripting languages. Byte code conversion gives better performance and helps in type
checking and error.
3.9.3 Uses of Servlet Architecture
Let us see some of the uses of servlet that are given below:
1. Servlets are used to form data manipulation like accepting form data and generating dynamic
HTML pages.
2. Servlets helps in developing server load balancing applications. Where load balancing is
among different servers.
3. Servlets are used as the middle tier in enterprise network platforms for connecting the SQL
database.
4. Servlets can be integrated with applets to provide high-level interactivity and dynamic web
content generation.
5. Servlet is used to develop applications where this act as an active agent in the middle tier,
where they share data with each other.