Installing Apache Tomcat on Ubuntu

This article is a guide to install and run Apache Tomcat 6 on Ubuntu 9.10. It covers version 6.0.20, but the steps are almost the same for any Tomcat 6 version. During the installation, we will create an script to help us control the server. This script will start, stop or restart the server depending on the parameters. Keeping the same folder structures used in previous posts, Tomcat 6 will be installed within the user's home folder, specifically, inside the servers folder (take a look at this post).

Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies, Tomcat 6 implements the Servlet 2.5 version and JavaServer Pages 2.1 version. In others words, Tomcat supplies an implementation of the Java Servlet and JavaServer Pages specifications in the form of a Web container, and you, as application developer, should develop your applications in the form of components (Servlets and JSPs) and deploy them over this container. Where do I listened this before?

Java EE application tiers, containers and components

At first, the aim of this post was to talk just about the Java EE containers, but then I thought it would be a good idea to include a few words about the components hosted by these containers, and finally, I ended up wrapping all this stuff with the typical tiers of a Java EE application. Thus, the post title.

This paragraph summarizes what is being explained on the whole article. Java EE platform uses a distributed multi-tiered application model for enterprise applications, and these tiers have containers that work as a runtime environment for the different components that made up the Java EE application. What? Let's see it in detail...

Installing Apache Ant on Ubuntu

In this article, we will install and test Apache Ant 1.7.1 on the Ubuntu 9.10 operating system. The installation will be done within the user's home folder, check the "Work area" post if you want to see clearly the folders structure used during the installation. Once it is installed on the system, we will test it with a tiny example to see the most basic functionalities.

Apache Ant is an open source build tool, in other words, a software tool for automating software build processes. Why? Typically, the building software processes implies much more than just writing the code and then compiling it, you might need to fetch some libraries, clean the build area, validate the source code and many others tasks. Ant is implemented using the Java language, so requires the Java platform, and is best suited to building Java projects. If a JDK is not present, only the JRE runtime, then many tasks will not work. The most immediately noticeable characteristic is that Ant uses XML to describe the build process and its dependencies, unlike other build tools, which are inherently shell-based. By default the XML file is named build.xml.

Installing Java Sun JDK on Ubuntu

This article will show how to install the Sun JDK 6 (Java Development Kit) on the Ubuntu 9.10 operating system. The installation of the JDK will be done within the user's home folder, the structure used is shown in the "Work area" post. If you are looking for the standard installation you will not find it here and I strongly recommend you to keep searching.

The JDK is mainly for developers; it is distributed along with library packages to develop software programs, utility tools like javac to compile Java source code to Java bytecode, java to execute this Java bytecode and many more contents bundled on it. Usually, each JDK contains one (or more) JRE (Java Runtime Environment), the JRE provides the minimum requirements for executing Java applications. It consists of a set of standard class libraries that implement the Java API (Application Programming Interface), the JVM (Java Virtual Machine), and supporting files. The Java bytecode is executed on the JVM. Since there are implementations of the JVM for different platforms (Linux, Solaris, Windows, etc), the source code can be compiled once and then executed independently on any of this platforms.

All the test will be done on the same host, and all the software installed will use and respect the same folder structure. This structure will be placed within the user's home folder, which is not the most common location to place the software programs, but this will allow us to install everything without requiring root privileges. Moreover, this will force us to be aware and take care of every configuration step, because we will not get anything configured by default.

Welcome to the "One-way ticket to Java" blog, if you expected to find recommendations and suggestions for travelling to the island of Java, sorry to disappoint you, but you will not find anything like that. This blog is rather a compilation of tests, concepts and thoughts on the Java Enterprise Edition Platform from Sun Microsystems.

The aim of this blog is to publish each article explaining clearly and intelligibly how works the tool, library, server or whatever is being tested at that time. There will be no configuration step unexplained, in any case, there will be links to previous published articles where that configuration step has been described in detail. Summing up, the content of this blog is intended to be more didactic than simply problem solving, not only seeks to solve the problem, but provide the information necessary to facilitate the understanding of the topic.

Finally, I would like to say that I hope all of you could find the help you were looking for among the posts of this blog and if not, I hope you could acquire at least some new knowledge.

Regards,

P.S. Sorry for any spelling or grammatical mistakes, I’m learning English.

Top