7.3. Using Servlets and JSP Together
We've learned how to use both servlets and JavaServer Pages now, and we've seen how we can use JavaBeans as a mechanism to pass data between them. So it's time to pull it all together. ServletThree is essentially ServletTwo with all of the HTML pulled out of it. The logic that was part of the servlet still remains, and the HTML formatting code has been farmed out to an HTML page (for the static main page) and two JSP pages (to enter a game result and to show the standings). Several new components will be introduced to the application in the ServletThree version; these are shown in Table 7.2.
New Components | ||
---|---|---|
Name | Component Type | Comment |
ServletThreeImpl |
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.