<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6270c71f40256a40ced5b22a/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6270c71f40256a40ced5b22a/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Ian Roughley</div><div class="t m0 x2 h3 y2 ff2 fs1 fc0 sc0 ls0 ws1">Practical Apac<span class="_ _0"></span>he </div><div class="t m0 x2 h3 y3 ff2 fs1 fc0 sc0 ls0 ws1">Struts2 W<span class="_ _1"></span>eb <span class="_ _2"></span>2.0 </div><div class="t m0 x2 h3 y4 ff2 fs1 fc0 sc0 ls0 ws0">Projects</div><div class="t m0 x3 h4 y5 ff3 fs2 fc1 sc0 ls0 ws0"><span class="fc2 sc0">9039fm.qxd 10/29/07 3:23 PM Page i</span></div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,-68.571429,-68.571429]}'></div></div>
</body>
</html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6270c71f40256a40ced5b22a/bg2.jpg"><div class="t m0 x2 h5 y6 ff4 fs3 fc0 sc0 ls0 ws0">Practical Apache Struts2 Web 2.0 Projects</div><div class="t m0 x2 h5 y7 ff4 fs3 fc0 sc0 ls0 ws0">Copyright © 2007 by Ian Roughley</div><div class="t m0 x2 h6 y8 ff5 fs2 fc0 sc0 ls0 ws0">All rights reserved. No part of this work may be r<span class="_ _0"></span>eproduced or transmitted in any form or by any means<span class="_ _0"></span>,</div><div class="t m0 x2 h6 y9 ff5 fs2 fc0 sc0 ls0 ws0">electronic or mechanical, including photocopying, r<span class="_ _0"></span>ecording, or b<span class="_ _0"></span>y any information storage or retrieval</div><div class="t m0 x2 h6 ya ff5 fs2 fc0 sc0 ls0 ws0">system, without the prior written permission of the copyright owner and the publisher<span class="_ _1"></span>.</div><div class="t m0 x2 h6 yb ff5 fs2 fc0 sc0 ls0 ws0">ISBN-13 (pbk): 978-1-59059-903-7</div><div class="t m0 x2 h6 yc ff5 fs2 fc0 sc0 ls0 ws0">ISBN-10 (pbk): 1-59059-903-9</div><div class="t m0 x2 h6 yd ff5 fs2 fc0 sc0 ls0 ws0">Printed and bound in the U<span class="_ _0"></span>nited States of America<span class="_ _3"> </span>9<span class="_ _3"> </span>8<span class="_ _3"> </span>7<span class="_ _3"> </span>6<span class="_ _3"> </span>5<span class="_ _3"> </span>4<span class="_ _3"> </span>3<span class="_ _4"> </span>2<span class="_ _3"> </span>1</div><div class="t m0 x2 h6 ye ff5 fs2 fc0 sc0 ls0 ws0">T<span class="_ _1"></span>rademarked names may appear in this book. Rather than use a trademar<span class="_ _0"></span>k symbol with ever<span class="_ _5"></span>y occurrence</div><div class="t m0 x2 h6 yf ff5 fs2 fc0 sc0 ls0 ws0">of a trademarked name<span class="_ _0"></span>, we use the names only in an editorial fashion and to the benefit of the trademark</div><div class="t m0 x2 h6 y10 ff5 fs2 fc0 sc0 ls0 ws0">owner<span class="_ _1"></span>, with no intention of infringement of the trademark.</div><div class="t m0 x2 h6 y11 ff5 fs2 fc0 sc0 ls0 ws0">J<span class="_ _0"></span>ava™ and all Java-based mar<span class="_ _0"></span>ks are trademarks or r<span class="_ _0"></span>egistered trademarks of S<span class="_ _0"></span>un Microsystems, Inc<span class="_ _0"></span>., in the</div><div class="t m0 x2 h6 y12 ff5 fs2 fc0 sc0 ls0 ws0">US and other countries. A<span class="_ _0"></span>press, Inc<span class="_ _0"></span>., is not affiliated with Sun Microsystems, I<span class="_ _0"></span>nc., and this book was writ-</div><div class="t m0 x2 h6 y13 ff5 fs2 fc0 sc0 ls0 ws0">ten without endorsement from Sun M<span class="_ _0"></span>icrosystems, Inc.</div><div class="t m0 x2 h6 y14 ff5 fs2 fc0 sc0 ls0 ws0">Lead Editor: Steve Anglin</div><div class="t m0 x2 h6 y15 ff5 fs2 fc0 sc0 ls0 ws0">T<span class="_ _1"></span>echnical Review<span class="_ _0"></span>er: Frank Zammetti</div><div class="t m0 x2 h6 y16 ff5 fs2 fc0 sc0 ls0 ws0">Editorial Board: S<span class="_ _0"></span>teve Anglin, Ewan B<span class="_ _0"></span>uckingham, T<span class="_ _1"></span>ony C<span class="_ _0"></span>ampbell, Gary Cornell, Jonathan Gennick, </div><div class="t m0 x4 h6 y17 ff5 fs2 fc0 sc0 ls0 ws0">J<span class="_ _0"></span>ason Gilmore<span class="_ _0"></span>, Kevin Goff, Jonathan H<span class="_ _0"></span>assell, Matthew M<span class="_ _0"></span>oodie, Joseph O<span class="_ _0"></span>ttinger<span class="_ _0"></span>, Jeffr<span class="_ _0"></span>ey Pepper<span class="_ _1"></span>, </div><div class="t m0 x4 h6 y18 ff5 fs2 fc0 sc0 ls0 ws0">Ben Reno<span class="_ _0"></span>w-Clarke, Dominic S<span class="_ _0"></span>hakeshaft, M<span class="ws2">att W<span class="_ _1"></span>ade, <span class="_ _5"></span>T<span class="_ _1"></span>om W<span class="_ _1"></span>elsh </span></div><div class="t m0 x2 h6 y19 ff5 fs2 fc0 sc0 ls0 ws0">Project Manager: C<span class="_ _0"></span>andace English</div><div class="t m0 x2 h6 y1a ff5 fs2 fc0 sc0 ls0 ws0">Cop<span class="_ _0"></span>y Editor: Julie M<span class="_ _0"></span>cNamee</div><div class="t m0 x2 h6 y1b ff5 fs2 fc0 sc0 ls0 ws0">Associate Production Dir<span class="_ _0"></span>ector: Kari Brooks-Copony</div><div class="t m0 x2 h6 y1c ff5 fs2 fc0 sc0 ls0 ws0">Production Editor: Candace English</div><div class="t m0 x2 h6 y1d ff5 fs2 fc0 sc0 ls0 ws0">Compositor: Linda <span class="_ _1"></span>W<span class="_ _0"></span>eidemann, <span class="_ _0"></span>W<span class="_ _0"></span>olf Creek P<span class="_ _0"></span>ress</div><div class="t m0 x2 h6 y1e ff5 fs2 fc0 sc0 ls0 ws0">Proofr<span class="_ _0"></span>eader: Lisa Hamilton</div><div class="t m0 x2 h6 y1f ff5 fs2 fc0 sc0 ls0 ws0">Indexer: Broccoli I<span class="_ _0"></span>nformation Management</div><div class="t m0 x2 h6 y20 ff5 fs2 fc0 sc0 ls0 ws0">Co<span class="_ _0"></span>ver Designer: Kurt Krames</div><div class="t m0 x2 h6 y21 ff5 fs2 fc0 sc0 ls0 ws0">Manufacturing Dir<span class="_ _0"></span>ector<span class="_ _5"></span><span class="ws3">: T<span class="_ _1"></span>om Debolski</span></div><div class="t m0 x2 h6 y22 ff5 fs2 fc0 sc0 ls0 ws3">D<span class="ws0">istributed to the book trade worldwide b<span class="_ _0"></span>y Springer-V<span class="_ _1"></span>erlag New <span class="_ _1"></span>Y<span class="_ _1"></span>ork, Inc., 233 S<span class="_ _0"></span>pring Street, 6th F<span class="_ _0"></span>loor<span class="_ _0"></span>,</span></div><div class="t m0 x2 h6 y23 ff5 fs2 fc0 sc0 ls0 ws0">New <span class="_ _1"></span>Y<span class="_ _1"></span>ork, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail </div><div class="t m0 x5 h6 y24 ff6 fs2 fc0 sc0 ls0 ws0">orders-ny@springer-sbm.com<span class="ff5">,</span></div><div class="t m0 x2 h6 y25 ff5 fs2 fc0 sc0 ls0 ws0">or<span class="_"> </span>visit <span class="ff6">http://www.springeronline.com</span>. </div><div class="t m0 x2 h6 y26 ff5 fs2 fc0 sc0 ls0 ws0">F<span class="_ _0"></span>or information on translations, please contact Apress dir<span class="_ _0"></span>ectly at 2855 T<span class="_ _6"></span>elegraph A<span class="_ _1"></span>venue, Suite 600,</div><div class="t m0 x2 h6 y27 ff5 fs2 fc0 sc0 ls0 ws0">Berkeley<span class="_ _1"></span>, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail <span class="ff6">info@apress.com</span>, or visit</div><div class="t m0 x2 h6 y28 ff6 fs2 fc0 sc0 ls0 ws0">http://www.apress.com<span class="ff5">. </span></div><div class="t m0 x2 h6 y29 ff5 fs2 fc0 sc0 ls0 ws0">The information in this book is distributed on an “<span class="_ _1"></span>as is<span class="_ _0"></span>” basis, without warranty<span class="_ _6"></span>. Although ever<span class="_ _5"></span>y pre-</div><div class="t m0 x2 h6 y2a ff5 fs2 fc0 sc0 ls0 ws0">caution has been taken in the preparation of this wor<span class="_ _0"></span>k, neither the author(s) nor Apress shall have any</div><div class="t m0 x2 h6 y2b ff5 fs2 fc0 sc0 ls0 ws0">liability to any person or entity with respect to any loss or damage caused or alleged to be caused dir<span class="_ _0"></span>ectly</div><div class="t m0 x2 h6 y2c ff5 fs2 fc0 sc0 ls0 ws0">or indirectly b<span class="_ _0"></span>y the information contained in this work. </div><div class="t m0 x2 h6 y2d ff5 fs2 fc0 sc0 ls0 ws0">The source code for this book is available to r<span class="_ _0"></span>eaders at <span class="ff6">http://www.apress.com</span>. </div><div class="t m0 x3 h4 y5 ff3 fs2 fc1 sc0 ls0 ws0"><span class="fc2 sc0">9039fm.qxd 10/29/07 3:23 PM Page ii</span></div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,-68.571429,-68.571429]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6270c71f40256a40ced5b22a/bg3.jpg"><div class="t m0 x2 h7 y2e ff2 fs4 fc0 sc0 ls0 ws0">Contents at a Glance</div><div class="t m0 x2 h8 y2f ff1 fs5 fc0 sc0 ls0 ws0">Foreword<span class="_ _7"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii</span></div><div class="t m0 x2 h8 y30 ff1 fs5 fc0 sc0 ls0 ws0">About the <span class="_ _0"></span>Author<span class="_ _2"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv</span></div><div class="t m0 x2 h8 y31 ff1 fs5 fc0 sc0 ls0 ws0">About the <span class="_ _0"></span>T<span class="_ _1"></span>echnical Reviewer<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi</span></div><div class="t m0 x2 h8 y32 ff1 fs5 fc0 sc0 ls0 ws0">Acknowledgments<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii</span></div><div class="t m0 x2 h8 y33 ff1 fs5 fc0 sc0 ls0 ws0">Introduction<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix</span></div><div class="t m0 x2 h9 y34 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 1<span class="_ _a"> </span><span class="ff2 ls2">Web 2.0 and Struts2<span class="_ _7"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1</span></span></span></div><div class="t m0 x2 h9 y35 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 2<span class="_ _a"> </span><span class="ff2 ls2">Getting Up and Running<span class="_ _8"></span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11</span></span></span></div><div class="t m0 x2 h9 y36 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 3<span class="_ _a"> </span><span class="ff2 ls3">Framework Overview<span class="_ _b"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37</span></span></span></div><div class="t m0 x2 h9 y37 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 4<span class="_ _a"> </span><span class="ff2 ls3">Application Overview<span class="_ _c"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71</span></span></span></div><div class="t m0 x2 h9 y38 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 5<span class="_ _a"> </span><span class="ff2 ls2">Data Manipulation<span class="_ _b"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89</span></span></span></div><div class="t m0 x2 h9 y39 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 6<span class="_ _a"> </span><span class="ff2 ls2">Wizards and Workflows<span class="_ _2"></span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147</span></span></span></div><div class="t m0 x2 h9 y3a ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 7<span class="_ _a"> </span><span class="ff2 ls3">Security<span class="_ _d"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179</span></span></span></div><div class="t m0 x2 h9 y3b ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 8<span class="_ _a"> </span><span class="ff2 ls2">Searching and Listings<span class="_ _3"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209</span></span></span></div><div class="t m0 x2 h9 y3c ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 9<span class="_ _a"> </span><span class="ff2 ls3">Syndication and Integ<span class="ls0">r</span>ation<span class="_ _7"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237</span></span></span></div><div class="t m0 x2 h9 y3d ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 10<span class="_ _e"> </span><span class="ff2 ls3">AJAX<span class="_ _d"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279</span></span></span></div><div class="t m0 x2 h9 y3e ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">INDEX <span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327</span></span></div><div class="t m0 x6 ha y3f ff4 fs2 fc0 sc0 ls0 ws0">v</div><div class="t m0 x3 h4 y5 ff3 fs2 fc1 sc0 ls0 ws0"><span class="fc2 sc0">9039fm.qxd 10/29/07 3:23 PM Page v</span></div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,-68.571429,-68.571429]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6270c71f40256a40ced5b22a/bg4.jpg"><div class="t m0 x2 h7 y2e ff2 fs4 fc0 sc0 ls0 ws0">Contents</div><div class="t m0 x2 h8 y2f ff1 fs5 fc0 sc0 ls0 ws0">Foreword<span class="_ _7"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii</span></div><div class="t m0 x2 h8 y30 ff1 fs5 fc0 sc0 ls0 ws0">About the <span class="_ _0"></span>Author<span class="_ _2"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv</span></div><div class="t m0 x2 h8 y31 ff1 fs5 fc0 sc0 ls0 ws0">About the <span class="_ _0"></span>T<span class="_ _1"></span>echnical Reviewer<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi</span></div><div class="t m0 x2 h8 y32 ff1 fs5 fc0 sc0 ls0 ws0">Acknowledgments<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii</span></div><div class="t m0 x2 h8 y33 ff1 fs5 fc0 sc0 ls0 ws0">Introduction<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix</span></div><div class="t m0 x2 hb y40 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 1<span class="_ _a"> </span><span class="fs9 ls0">W<span class="ls4">eb 2.0 and Struts2<span class="_"> </span></span><span class="ff1 fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1</span></span></span></div><div class="t m0 x7 h8 y41 ff1 fs5 fc0 sc0 ls0 ws0">What Is Web 2.0?<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1</span></div><div class="t m0 x7 h8 y42 ff1 fs5 fc0 sc0 ls0 ws0">Web Application Development 2.0<span class="_ _d"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5</span></div><div class="t m0 x8 h8 y43 ff1 fs5 fc0 sc0 ls0 ws0">Web Framework Agility with Struts2<span class="_ _c"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . 6</span></div><div class="t m0 x7 h8 y44 ff1 fs5 fc0 sc0 ls0 ws0">Using this Book<span class="_ _c"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8</span></div><div class="t m0 x2 hb y45 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 2<span class="_ _a"> </span><span class="fs9 ls4">Getting Up and Running<span class="_"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11</span></span></span></div><div class="t m0 x7 h8 y46 ff1 fs5 fc0 sc0 ls0 ws0">The Build Process<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11</span></div><div class="t m0 x8 h8 y47 ff1 fs5 fc0 sc0 ls0 ws0">Maven2<span class="_ _f"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12</span></div><div class="t m0 x7 h8 y48 ff1 fs5 fc0 sc0 ls0 ws0">The Struts2 Starter Application<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15</span></div><div class="t m0 x8 h8 y49 ff1 fs5 fc0 sc0 ls0 ws0">The Maven2-Generated Directory and File Structure<span class="_ _c"> </span><span class="fs6">. . . . . . . . . . . . 15</span></div><div class="t m0 x8 h8 y4a ff1 fs5 fc0 sc0 ls0 ws0">The Maven2 Configuration File<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16</span></div><div class="t m0 x8 h8 y4b ff1 fs5 fc0 sc0 ls0 ws0">Starter Application Features<span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20</span></div><div class="t m0 x7 h8 y4c ff1 fs5 fc0 sc0 ls0 ws0">Summary<span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35</span></div><div class="t m0 x2 hb y4d ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 3<span class="_ _a"> </span><span class="fs9 ls5">Framework Overview<span class="_ _f"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37</span></span></span></div><div class="t m0 x7 h8 y4e ff1 fs5 fc0 sc0 ls0 ws0">Walking Through a Request-Response<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37</span></div><div class="t m0 x8 h8 y4f ff1 fs5 fc0 sc0 ls0 ws0">The Request Initiation<span class="_ _d"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38</span></div><div class="t m0 x8 h8 y50 ff1 fs5 fc0 sc0 ls0 ws0">The Struts2 Servlet Filter<span class="_ _f"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38</span></div><div class="t m0 x8 h8 y51 ff1 fs5 fc0 sc0 ls0 ws0">The Action Invocation<span class="_ _f"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39</span></div><div class="t m0 x8 h8 y52 ff1 fs5 fc0 sc0 ls0 ws0">The Action<span class="_ _2"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39</span></div><div class="t m0 x8 h8 y53 ff1 fs5 fc0 sc0 ls0 ws0">Interceptors<span class="_ _10"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39</span></div><div class="t m0 x8 h8 y54 ff1 fs5 fc0 sc0 ls0 ws0">The Results<span class="_ _2"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40</span></div><div class="t m0 x9 ha y3f ff4 fs2 fc0 sc0 ls0 ws0">vii</div><div class="t m0 x3 h4 y5 ff3 fs2 fc1 sc0 ls0 ws0"><span class="fc2 sc0">9039fm.qxd 10/29/07 3:23 PM Page vii</span></div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,-68.571429,-68.571429]}'></div></div>
<div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6270c71f40256a40ced5b22a/bg5.jpg"><div class="t m0 x7 h8 y55 ff1 fs5 fc0 sc0 ls0 ws0">Exploring the Core Components<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40</span></div><div class="t m0 x8 h8 y56 ff1 fs5 fc0 sc0 ls0 ws0">Actions<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41</span></div><div class="t m0 x8 h8 y57 ff1 fs5 fc0 sc0 ls0 ws0">Interceptors<span class="_ _10"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42</span></div><div class="t m0 x8 h8 y58 ff1 fs5 fc0 sc0 ls0 ws0">Custom Interceptors<span class="_ _c"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45</span></div><div class="t m0 x8 h8 y59 ff1 fs5 fc0 sc0 ls0 ws0">The Value Stack and OGNL<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46</span></div><div class="t m0 x8 h8 y5a ff1 fs5 fc0 sc0 ls0 ws0">Results and Result Types<span class="_ _7"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48</span></div><div class="t m0 x8 h8 y5b ff1 fs5 fc0 sc0 ls0 ws0">Tag Libraries<span class="_ _10"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49</span></div><div class="t m0 x7 h8 y5c ff1 fs5 fc0 sc0 ls0 ws0">Configuring the Elements of the Framework<span class="_ _11"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . 52</span></div><div class="t m0 x8 h8 y5d ff1 fs5 fc0 sc0 ls0 ws0">The web.xml File<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52</span></div><div class="t m0 x8 h8 y5e ff1 fs5 fc0 sc0 ls0 ws0">Zero Configuration Annotations<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52</span></div><div class="t m0 x8 h8 y5f ff1 fs5 fc0 sc0 ls0 ws0">The <span class="ff8">struts.xml<span class="_ _b"> </span></span>File<span class="_ _5"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55</span></div><div class="t m0 x8 h8 y60 ff1 fs5 fc0 sc0 ls0 ws0">Configuring the Execution Environment<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . 65</span></div><div class="t m0 x7 h8 y61 ff1 fs5 fc0 sc0 ls0 ws0">Extending the Framework<span class="_ _c"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67</span></div><div class="t m0 x7 h8 y62 ff1 fs5 fc0 sc0 ls0 ws0">Summary<span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69</span></div><div class="t m0 x2 hb y63 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 4<span class="_ _a"> </span><span class="fs9 ls4">Application Overview<span class="_ _b"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71</span></span></span></div><div class="t m0 x7 h8 y64 ff1 fs5 fc0 sc0 ls0 ws0">The Application<span class="_ _11"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71</span></div><div class="t m0 x8 h8 y65 ff1 fs5 fc0 sc0 ls0 ws0">Use Cases<span class="_ _d"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72</span></div><div class="t m0 x8 h8 y66 ff1 fs5 fc0 sc0 ls0 ws0">Integration Technologies<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73</span></div><div class="t m0 x8 h8 y67 ff1 fs5 fc0 sc0 ls0 ws0">The Domain Model<span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74</span></div><div class="t m0 x7 h8 y68 ff1 fs5 fc0 sc0 ls0 ws0">An Agile Development Process<span class="_ _7"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75</span></div><div class="t m0 x7 h8 y69 ff1 fs5 fc0 sc0 ls0 ws0">Continuous Integration<span class="_ _b"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76</span></div><div class="t m0 x7 h8 y6a ff1 fs5 fc0 sc0 ls0 ws0">Integrating the Persistence Layer<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77</span></div><div class="t m0 x8 h8 y6b ff1 fs5 fc0 sc0 ls0 ws0">Configuring the Dependencies<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78</span></div><div class="t m0 x8 h8 y6c ff1 fs5 fc0 sc0 ls0 ws0">Installing MySQL<span class="_ _3"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81</span></div><div class="t m0 x8 h8 y6d ff1 fs5 fc0 sc0 ls0 ws0">Configuring Hibernate<span class="_ _2"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83</span></div><div class="t m0 x8 h8 y6e ff1 fs5 fc0 sc0 ls0 ws0">Using Hibernate to Create Data Access Objects<span class="_ _8"></span><span class="fs6">. . . . . . . . . . . . . . . . . 85</span></div><div class="t m0 x7 h8 y6f ff1 fs5 fc0 sc0 ls0 ws0">Summary<span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88</span></div><div class="t m0 x2 hb y70 ff7 fs7 fc3 sc0 ls0 ws0">■<span class="_ _9"></span><span class="ff4 fs8 fc0 ls1">CHAPTER 5<span class="_ _a"> </span><span class="fs9 ls4">Data Manipulation<span class="_ _c"> </span><span class="ff1 fs6 ls0">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89</span></span></span></div><div class="t m0 x7 h8 y71 ff1 fs5 fc0 sc0 ls0 ws0">The Use Case<span class="_ _7"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89</span></div><div class="t m0 x7 h8 y72 ff1 fs5 fc0 sc0 ls0 ws0">CRUD Functionality<span class="_"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90</span></div><div class="t m0 x7 h8 y73 ff1 fs5 fc0 sc0 ls0 ws0">The Domain Model<span class="_ _11"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90</span></div><div class="t m0 x8 h8 y74 ff1 fs5 fc0 sc0 ls0 ws0">Model-Driven Actions<span class="_ _f"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91</span></div><div class="t m0 x8 h8 y75 ff1 fs5 fc0 sc0 ls0 ws0">Setup Code and Data Prepopulation<span class="_ _10"></span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . 92</span></div><div class="t m0 x8 h8 y76 ff1 fs5 fc0 sc0 ls0 ws0">Configuration<span class="_ _11"> </span><span class="fs6">. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96</span></div><div class="t m0 x2 ha y77 ff7 fsa fc3 sc0 ls0 ws0">■<span class="_ _12"></span><span class="ff2 fs2 fc0 ls6">CONTENTS<span class="_ _13"></span><span class="ff4 ls0">viii</span></span></div><div class="t m0 x3 h4 y5 ff3 fs2 fc1 sc0 ls0 ws0"><span class="fc2 sc0">9039fm.qxd 10/29/07 3:23 PM Page viii</span></div></div><div class="pi" data-data='{"ctm":[1.904762,0.000000,0.000000,1.904762,-68.571429,-68.571429]}'></div></div>