Your First Cup: An Introduction to the Java EE Platform

Previous
Next

4 Creating Your Second Web Application

This chapter gives step-by-step instructions on coding and running the firstcup-war web application, which uses the dukes-age web service described in Chapter 3, "Creating Your First Java EE Application". The firstcup-war web application is a more complicated application that uses several different Java EE APIs.

The firstcup-war example application consumes the data from the dukes-age web service using the JAX-RS client API. A JavaServer Faces web front end asks users to enter their birthdays to find out who is older, the user or Duke. This data is stored in a Java DB database table using the Java Persistence API. The business logic, which provides the core functionality of the application, is handled by an enterprise bean.

All the tiers described in Tiered Applications are present in the firstcup-war web application. The web or client tier is the JavaServer Faces front end. The enterprise information systems, or EIS, tier is the Java DB database. The business tier is the enterprise bean.

Previous
Next