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

The Address Editing Page

When the address page (see Listing 16.5) is brought up, it displays the fields for the address. One of the nice features of using the Struts html:text tag is that it automatically handles filling in previous values and even does null to empty string conversion. Struts will also do type conversion on the way out, turning a text field into an int, for example.

Listing 16.5. Address.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() ...

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