Home
Introduction to Java EE Web applications
Java Enterprise Edition (Java EE) is an application development framework that is the most popular standard for building and deploying Web applications in Java. Two of the key underlying technologies for building the Web components of Java EE applications are servets and JSPs. Servlets are Java classes that provide the entry point to logic for handling a Web request and return a Java representation of the Web response. JSPs are a mechanism to combine HTML with logic written in Java. After they have been compiled and deployed, JSPs run as a servlet, where they also take a Web request and return a Java object representing the response page.
Typically, in a large project, the JSPs and servlets are part of the presentation layer of the application and include logic to invoke the higher level business methods. The core business functions are usually separated out into a clearly defined set of interfaces, so that these components can be used and changed independently of the presentation layer (or layers, when there is more than one interface).
Enterprise JavaBeans (EJBs) are also a key feature included in the Java EE framework and are one popular option to implement the business logic of an application. These are described in detail in Chapter | 4, Developing EJB applications. The separation of the presentation logic, business logic, and the logic to combine them is referred to as the model-view-controller pattern and is described later.
Technologies such as Struts, JavaServer Faces (JSF), various JSP tag libraries and numerous others have been developed to extend the JSP and servlets framework in different ways to improve aspects of Java EE Web development (for example, JSF facilitates the construction of reusable UI components which can be added to JSP pages). Some of these are described in detail in other chapters of this book, however, it is important to note that the underlying technologies of these tools are extensions to Java servlets and JSPs.
When planning a new project, the choice of technology depends on several criteria (size or project, previous implementation patterns, maturity of technology, skills of the team, and so on). Using JSPs with servlets and HTML is a comparatively simple option for building Java EE Web applications.
Figure | 3-1 shows the relationship between Java EE, Enterprise Application, Web applications, EJBs, servlets, JSPs, and additions such as Struts and JSF.
Figure 13-1 Java EE related technologies
Our focus in this chapter is on developing Web applications using JSPs, servlets, and static pages using HTML with the tools included with RAD v7.5. After you have mastered these concepts, it should be easier for you to understand the other technologies available.
ibm.com/redbooks