Professional Documents
Culture Documents
AJP Microproject
AJP Microproject
THIM TRUST’S
A
PROJECT REPORT
ON
“Servlets”
IN THE FULFILMENT OF
DIPLOMA
IN
Computer Engineering
Year 2022-23
SUBMITED BY
PROJECT GUIDE
Prof. Adil Shaikh
1
H. J. THIM TRUST’S
Boisar chillar Road, Boisar (E), Tal. Palghar Dist. Palghar, Pin- 401501
Certificate
This is to certify that the report has been submitted by following students
This project work has been completed by 3rd Year Students of course Computer Department as a
Part of Team Work Prescribed by Maharashtra State Board of Technical Education, Mumbai. We
have guided and assisted the Students for the above work, which has been found
Satisfactory/Good/Very Good.
Signature of Signature of
2
DECLARATION
We students of second year diploma in Computer engineering, hereby declare that we have
successfully completed this project on Servlets in academic year 2022-23 in semester fifth. The
information incorporated in this project is true and original to best of our knowledge.
Date:
3
ACKNOWLEDGEMENT
It’s our pleasure to take this opportunity to thank with deep sense of gratitude to our guide,
staff members of Third year department & everyone who have directly or indirectly contributed
tour project as a success. With immense pleasure we express our deep sense of gratitude & vote of
thank to our project guide Prof. Adil Shaikh for her constant interest, motivation & valuable
guidance during work & completion of this project report.
We are also very thankful to all those who supported us without which project would not
have been completed successfully.
4
TABLE OF CONTENT
2. Execution of Servlets 7
basically involves six
basic steps:
Why do we need For
Server-Side extensions?
3. What is CGI? 8
4. Difference between 9
servlets and CGI
5. Servlets API’s 10
6. Advantages of a Java 11
Servlet
8. Conclusion 13
5
INTRODUCTION
Today we all are aware of the need of creating dynamic web pages i.e the
ones which have the capability to change the site contents according to the time or
are able to generate the contents according to the request received by the client. If
you like coding in Java, then you will be happy to know that using Java there also
exists a way to generate dynamic web pages and that way is Java Servlet. But
before we move forward with our topic let’s first understand the need for server-
side extensions.
Servlets are the Java programs that run on the Java-enabled web server or
application server. They are used to handle the request obtained from the
webserver, process the request, produce the response, then send a response back to
the webserver.
Servlet Architecture is can be depicted from the image itself as provided below as
follows:
6
Execution of Servlets basically involves six basic steps:
6. The web server sends the response back to the client and the client
browser displays it on the screen.
The server-side extensions are nothing but the technologies that are used to
create dynamic Web pages. Actually, to provide the facility of dynamic Web pages,
Web pages need a container or Web server. To meet this requirement, independent
Web server providers offer some proprietary solutions in the form of APIs
(Application Programming Interface).
These APIs allow us to build programs that can run with a Web server. In
this case, Java Servlet is also one of the component APIs of Java Platform
Enterprise Edition which sets standards for creating dynamic Web applications in
Java.
Before learning about something, it’s important to know the need for that
something, it’s not like that this is the only technology available for creating
dynamic Web pages. The Servlet technology is similar to other Web server
extensions such as Common Gateway Interface (CGI) scripts and Hypertext
Preprocessor (PHP). However, Java Servlets are more acceptable since they solve
the limitations of CGI such as low performance and low degree scalability.
7
What is CGI?
1. It first locates the requested web page i.e the required CGI application
using URL.
2. It then creates a new process to service the client’s request.
3. Invokes the CGI application within the process and passes the request
information to the application.
4. Collects the response from the CGI application.
5. Destroys the process, prepares the HTTP response, and sends it to the
client.
So, in CGI server has to create and destroy the process for every request. It’s
easy to understand that this approach is applicable for handling few clients but as
the number of clients increases, the workload on the server increases and so the
time is taken to process requests increases.
8
Difference between Servlet and CGI:
9
Servlets API’s:
Servlets are build from two packages:
1. javax.servlet(Basic)
2. javax.servlet.http(Advance)
10
Advantages of a Java Servlet :
6. Many Web servers that are suitable for personal use or low-traffic
websites are offered for free or at extremely cheap costs eg. Java
servlet. However, the majority of commercial-grade Web servers are
rather expensive, with the notable exception of Apache, which is free.
11
The Servlet Container:
1. Network Services: Loads a Servlet class. The loading may be from a local
file system, a remote file system or other network services. The Servlet
container provides the network services over which the request and
response are sent.
12
CONCLUSION
13