| CONTENTS | PREV | NEXT | INDEX | Designing Enterprise Applications with the J2EETM Platform, Second Edition |
A server in the Web tier processes HTTP requests. In a J2EE application, the Web tier usually manages the interaction between Web clients and the application's business logic. The Web tier typically produces HTML or XML content, though the Web tier can generate and serve any content type. While business logic is often implemented as enterprise beans, it may also be implemented entirely within the Web tier.
The Web tier typically performs the following functions in a J2EE application:
- Web-enables business logic--The Web tier manages interaction between Web clients and application business logic.
- Generates dynamic content--Web-tier components generate content dynamically, in entirely arbitrary data formats, including HTML, images, sound, and video.
- Presents data and collects input--Web-tier components translate HTTP PUT and GET actions into a form that the business logic understands and present results as Web content.
- Controls screen flow--The logic that determines which "screen" (that is, which page) to display next usually resides in the Web tier, because screen flow tends to be specific to client capabilities.
- Maintains state--The Web tier has a simple, flexible mechanism for accumulating data for transactions and for interaction context over the lifetime of a user session.
- Supports multiple and future client types--Extensible MIME types describe Web content, so a Web client can support any current and future type of downloadable content.
- May implement business logic--While many enterprise applications implement business logic in enterprise beans, Web-only, low- to medium-volume applications with simple transactional behavior can implement business logic entirely within the Web tier.