Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Tomcat, Jakarta Project,

JSP & Servlets


A project made by Pablo Lestau 2ºDAW

Index

1. Tomcat, history and Jakarta Project


2. JSP
3. Servlets

27/10/2021
1

Tomcat
Tomcat is a free open source container of Servlets developed under “Jakarta’s project”
in the Apache Software Foundation and released under the Apache License 2.0 license.
Tomcat provides a pure Java HTTP web server environment in which Java code can run.

History

James Duncan Davidson,a software architect at Sun Microsystems, started


Tomcat as a Servlet reference implementation, he helped make the project open-source
and played a key role in it’s donation by Sun Microsystems to the Apache Software
Foundation. Since 2.0 series from 1998 to 10.0 in 2021, Tomcat has been upgrading
with the time, in 4.1 series to support Servlet 2.3 and JSP 1.2 for the first time, and
upgrading to reach the level of technology with time. Now with the 9.0.54 version, it
support the Servlet 5.9, JSP 5.0, JSP 3.0, EL 4.0, Websocket 2.0 and authentication 2.0

Apache Tomcat Logo. Image 1

What is the Jakarta project?


The Jakarta Project was created for the Java platform in 1999. It operated as a
global project developed by the Apache Software Foundation and every project
produced by Jakarta is liberated under the Apache License(open source). In december
2011, it was retired because no subprojects were remaining. In June 1999, Sun and
Apache agreed that Sun would license the source code to the public under the open
Apache license. In 2005 began to become full top-level Apache projects.
2

JSP
Jakarta Server Pages is a collection of technologies that helps software
developers create dynamically generated web pages based on HTML, XML, SOAP or
other document types. JSP is similar to PHP and ASP but uses the Java programming
language.

Pros and Cons of using JSP

JSP along with JSTL/EL are terrific for presenting web content (not just HTML,
for XML, CSS and dynamic CSS too) . It’s pretty easy to learn and widely adopted
everywhere. When developing, it tends to have a fairly turn around. But JSP’s are not a
panacea to web and UI development. Even JSP pages require about double the disk
space to hold the page because JSp pages are translated into class files and the server
has to store the resultant class files with the pages.

JSP document example. Image 2


3

Servlet
A Servlet is a Java Technology that is managed by a container called a Servlet
engine. It generates dynamic content and interacts with the client through request and
response. Servlet extends the functionality of a web server because Servlets can
implement a web container for hosting any website on a web server through many types
of requests. First the Servlet is initialized, then it interacts with the client and later the
Servlet is destroyed.

The Java Servlet 1.0 API was released on December 1996 and until 2017 in Java
Servlet 4.0, with changes like the addition of filter, web.xl that used Schema, HTTP2,
until 2019 in Jakarta Servlet 4.0.3 as part of the Jakarta Project, and without any major
changes until now.

Comparison: Servlet vs JSP

Servlets run faster than JSP, because it compiles the program and converts into
Servlets. It’s easier to code in JSP compared to Servlets. In MVC architecture, Servlets
work as a controller but JSP works as a view for displaying output. In JSP you can easily
build custom tags that can directly call Java Beans but in Servlets there is no custom
tag writing facility. Servlets is a java code and JSP is a HTML-based code. Servlets can
accept all protocol requests and JSp can only accept HTTP requests. In Servlets you
can override the service() method and in JSP not. In Servlet you have to implement both
business logic and presentation logic in the same file but in JSp, business logic is split
from presentation logic using JavaBeans and modification in a Servlet file is a time
consuming due to reloading, recompiling and restarting the server, but JSP modification
is fast, as you just need to click one refresh button.
4

Bibliography

Tomkat’s wikipedia page: https://en.wikipedia.org/wiki/Tomcat

Jakarta project’s wikipedia page: https://en.wikipedia.org/wiki/Jakarta_Project

Jakarta project’s page: https://jakarta.apache.org/

Java World 2009 Page: https://web.archive.org/web/20090627034041/h


&tp://www.javaworld.com/javaworld/jw-06-1999/jw-06-sunapache.html?page=1 &2

Desventajas y ventajas JSP: https://www.oxxus.net/tutorials/jsp/jsp-disadvantage

https://www.quora.com/What-are-the-pros-and-cons-of-JSP

JSP Wikipedia page: https://en.wikipedia.org/wiki/Jakarta_Server_Pages

Jakarta Servlet wikipedia page: https://en.wikipedia.org/wiki/Jakarta_Servlet#History

Servlet vs JSP comparison:


https://www.guru99.com/difference-between-servlets-vs-jsp.html

You might also like