Professional Documents
Culture Documents
Servlet Architecture - GeeksforGeeks
Servlet Architecture - GeeksforGeeks
Java Arrays Java Strings Java OOPs Java Collection Java 8 Tutorial Java Multithreading Java Exception Handling Java Programs Java Project Java C
Servlets are grouped under the Advanced Java tree that are used to
Share Your Campus
Experience create dynamic web applications. Servlets are robust in nature,
well scalable and are primarily used in developing server-side
Life Cycle of a Servlet applications. If we go a little back in time, we would be able to
witness that before the introduction of servlets, CGI (Common
The HttpSession Interface in
Servlet Gateway Interface) were used. Amid several indigenous tasks that
a servlet is capable of doing, dynamically performing client
Servlet Collaboration In Java requests and responses are most common. Other tasks that a
Using RequestDispatcher and
HttpServletResponse servlet can do effectively are:
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy
Skip to content
10/12/23, 10:45 PM Servlet Architecture - GeeksforGeeks
Servlet Architecture
1. Client
2. Web Server
3. Web Container
Skip to content
10/12/23, 10:45 PM Servlet Architecture - GeeksforGeeks
1. init()
2. service()
3. destroy()
These methods are used to process the request from the user.
Advantages
Prime functionality of a servlet is that they are independent of
server configuration and they are pretty much compatible with
any of the web servers
Servlets are also protocol-independent supporting FTP, HTTP,
SMTP, etc. protocols to the fullest.
Until destroyed manually, servlets can be retained in the
memory helping process several requests over time. Also, once
a database connection is established, it can facilitate process
several requests for a database in the very same database
session.
We use cookies to ensure you have the bestServlets inherit on
browsing experience Java’s property
our website. ofour
By using portability and hence
site, you acknowledge are
that you have read and
understood our Cookie Policy & Privacy Policy
compatible with nearly any web server.
Skip to content
10/12/23, 10:45 PM Servlet Architecture - GeeksforGeeks
Servlets are first converted into byte codes and then executed,
which helps in increasing the processing time.
Disadvantages
Designing a servlet can be pretty laborious.
Exceptions need to be handled while designing a servlet since
they are not thread-safe.
Developers may need additional skills to program a servlet.
Similar Reads
Javax.servlet.http.Co Servlet
class in Java Collaboration In
Java Using…
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy
Skip to content
10/12/23, 10:45 PM Servlet Architecture - GeeksforGeeks
Related Tutorials
Java AWT Tutorial Spring MVC Tutorial
Java 8 Features -
Complete Tutorial
Previous Next
Skip to content
10/12/23, 10:45 PM Servlet Architecture - GeeksforGeeks
Article Contributed By :
shahzaibanwarkhan
S shahzaibanwarkhan
Follow
Master Java
Programming - Complete
Beginner to Advanced
Kick-start your JAVA programming
journey with this self-paced course
40+the
and master hours of
language from...163k+
content views
Mentorship byLEARN
Experts MORE
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy
Skip to content
10/12/23, 10:45 PM Servlet Architecture - GeeksforGeeks