Accessing the Customer Class from JSP

Having created your underlying class, you can proceed to hook it up to some JSP pages to actually do something. For the moment, these sections walk you through some bare-bones pages that create and retrieve customers.

To begin, set up a customer-creation page. Before you do, you need to think out your JSP document strategy. You already know that some elements, such as the mini-cart and navigational bars, will appear on most pages. One strategic approach that you can take is to use a single JSP file to control access to all of the site functionality and then have the code dispatch to different subpages inside the main page to display different content depending on the session state. This way, if a user bookmarks ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL 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.