O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required