For developing web applications in Java using Servlets and JSP, we will use the following software:
- OpenJDK: an open source implementation of the Java Platform. OpenJDK is part of most Linux distributions now (as well as on Mac OS X) but needs to be manually installed on Windows.
- Apache Tomcat: an open source software implementation of the Java Servlet and JavaServer Pages (JSP) technologies. Tomcat is a web container in which web applications written in Java can be deployed for execution.
- SpringSource Tool Suite: a powerful variant of the open source Eclipse development environment for building Java enterprise applications. STS can be used to create web application in Java and it can also deploy those applications automatically to Tomcat. STS is made by the same people behind the Spring framework.
As mentioned above, OpenJDK is already installed in Linux. Tomcat and STS need to be installed manually.
Work to do
To check whether the whole environment is setup properly, we will create a small (but fully functional) HelloWorldWeb application using STS and deploy it to Tomcat. On execution, we expect the following:
After testing, export the project as a WAR file and examine the contents of the archive. This WAR file is what is being sent to Tomcat by STS.
This is an overview of how Tomcat works.