Chapter 10. JavaServer Pages Concepts

Most of the content presented to the user as part of a Web application is HTML. These Web pages are easily created and managed using HTML page editors which allow the developer to concentrate on the presentation and content through the use of a WYSIWYG user interface. In previous chapters, we have concentrated on the mechanics of the implementation of server-side logic using servlets. In one example, servlets directly delivered HTML content to the HTTP output stream with string literals in Java. While this gets the job done, few would consider this a best practice.

As an alternative to creating all output on the servlet, one could use the RequestDispatcher object, available from the ServletRequest, to include ...

Get Enterprise Java Programming with IBM WebSphere now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.