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

Two-Step Forms

The credit card code shows how you can implement a form that is filled out in two steps. The first page (see Listing 16.8) looks much like the Address.jsp code, letting the user fill out or edit the credit card information.

Listing 16.8. CreditCard.jsp
 <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ include file="/jsp/cust/AutoLogin.jsp" %> <% { Customer customer = (Customer) pageContext.getAttribute("customer", PageContext.SESSION_SCOPE); if (( customer == null) || (customer.getEmail() == null)) { response.sendRedirect("Login.jsp"); return; } } %> <html:html> <head> <title> <bean:message key="mycard.title"/> </title> <%@ include ...

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