Chapter 6. JavaServer Pages

If you felt there was something awkward about the combination of business logic and HTML formatting going on in the early servlet examples, you're not alone. We sidestepped this issue nicely, I think, in our own servlet examples by creating a separate HTML class that handled the responsibility of formatting our output. Certainly a well-designed architecture built upon servlets can enforce a separation of application code and presentation code into different classes just as we have done, but JavaServer Pages (JSPs) have emerged to fill the perceived need for a tool to assist in making this separation. JSPs turns the servlet concept upside down. A servlet can be seen as a program that has HTML embedded in it. A JavaServer ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services 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.