Expert Spring MVC and Web Flow

(Dana P.) #1

JSP Files


We are taking advantage of many different Spring JSP tags when building these pages.
Along with the usual tag, we are also going to use
and . You’ll see more about these tags in Chapters 7 and 9, but for now it’s
important to know that spring:hasBindErrorsexposes an errorsattribute to the JSP page if
there are validation errors, and spring:messageperforms i18n formatting duties.
We will first build the XHTML page, as shown in Listing 6-66. Pay special attention to the
use of the hidden _page0and _target1form elements.


Listing 6-66.XHTML for Page 1


<?<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">





Create an Account
" type="text/css" />


Create an Account


















CHAPTER 6 ■THE CONTROLLER MENAGERIE 183