Introduction

In this part of the JEE tutorials, we will talk about the goals of the tutorials and we provide some definitions.

About JEE tutorials

The JEE tutorials are a set of tutorials covering the Java Platform, Enterprise Edition. (JEE) The purpose of the tutorials is to introduce novice programmers to the JEE platform.

JEE programmer

Every good JEE programmer must acquire an enormous amount of knowledge. Everybody tells you what to study, but no one tells you how to study. One can easily be lost in all this tools, technologies, recommendations, libraries. There are many tools that help advance programmers develop their applications. But on the other hand, they bring additional complexity to development. Tools like XDoclet or Hibernate help advanced JEE programmers focus on the application logic, but necessarily make the learning curve steeper for a novice programmer. Have a look at the various Apache projects at www.apache.org. Ant, Cocoon, iBATIS, Struts, Maven, Tapestry, Xalan, Velocity. Just to name a few.

You cannot become a general, unless you were a private. You must go to the top, from the very bottom. There is no shortcut available. The best way for a novice programmer is a step by step approach. Pick one tool, library at a time and play with it. Realizing all this, I have made the tutorials to cope with all this complexity. We will begin with the very basic things like installing necessary tools, trying very simple JSP files or servlets.

Java Platforms

The world of Java is divided into the following three platforms.

The Java SE is the core Java technology platform. It is used to create Java desktop and server applications. The Java ME is aimed at creating applications for portable devices like cell phones or PDAs. The Java EE is a platform for creating large enterprise applications. It adds libraries necessary to create stable, secure, multi-tier, distributed applications.

Java EE

Java Platform, Enterprise Edition is a set of libraries, tools, specifications, best practices for developing, deploying and managing server side enterprise level applications.

Each application is executed on the application server. Some of the well known application servers are JBoss, OCJ, Resin, and WebLogic. In this tutorials, we will use Resin. To create and manage source code, developers use Integrated Development Environments, (IDEs). The most popular Java IDEs are NetBeans, Eclipse, JDeveloper, and IntelliJ IDEA.

The key technologies of the Java EE are:

To install all this technologies, we can go to sun download site, or we can download the NetBeans JEE pack. These technologies are included in this pack.

The Java Platform, Enterprise Edition is not limited to these technologies. The platform has a wide variety of additional tools and libraries. The numerous Apache projects are good examples.

The Java EE also consists of a set of best practices, coding styles, and software patterns.

Web Application

An enterprise application consists of web modules. These are packaged in war files. A war (short for Web Archive) file is jar file used to distribute a collection of JavaServer Pages, servlets, Java classes, XML files, tag libraries and static Web pages. They create a web application. Smaller web applications can be packaged in a war file.

All servlets, classes, static files, and other resources belonging to a Web Application are organised under a directory hierarchy.

Web application
Figure: Web application

The root directory of this directory structure is called the document root. Let's have a web application called email. For the Resin AS, the path to the document root would be:

RESIN_INSTALL_DIR/webapps/email 

We place our files and resources under the document root directory. All files are visible except for a special directory WEB-INF. All files under the WEB-INF directory are private and are not visible to the client. The WEB-INF directory is optional, but it is always created unless we create some very simple examples.

The WEB-INF directory contains two special files and two directories. The web.xml file is a web application deployment descriptor. It is used to configure the web application. The web.xml file is a Java EE deployment descriptor. It is defined by a specification. There is another type of descriptor called runtime deployment descriptor. It is used to configure Java EE implementation specific parameters. In the case of Resin Application Server, the runtime deployment descriptor is called resin-web.xml. In case of GlassFish AS it is called sun-web.xml.

The two special directories are named classes and lib. We place all compiled servlets and utility classes under the classes directory. The lib directory contains additional libraries in form of JAR files. These can be e.g. third party libraries like database drivers or XML parsers.

It is conventional to put tag files into the tag directory.

Tools

The tools that we use in the JEE tutorials are:

This was an introduction to JEE.