ART
OF
JAVA WEB
DEVELOPMENT
STRUTS TAPESTRY COMMONS VELOCITY
Neal Ford
JUNIT AXIS COCOON INTERNETBEANS WEBWORK MANNING
Art of Java Web Development
Art of Java Web Development STRUTS, TAPESTRY, COMMONS, VELOCITY, JUNIT, AXIS, COCOON, INTERNETBEANS, WEBWORK
NEAL FORD
MANNING Greenwich (74° w. long.)
For online information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Greenwich, CT 06830
Fax: (203) 661-9018 email:
[email protected]
©2004 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books they publish printed on acid-free paper, and we exert our best efforts to that end.
Manning Publications Co. 209 Bruce Park Avenue Greenwich, CT 06830
Copyeditor: Liz Welch Typesetter: Dottie Marsico Cover designer: Leslie Haimes
ISBN: 1-932394-06-0 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – VHG – 08 07 06 05 04 03
To Chuck, who still teaches me stuff daily
brief contents PART I THE EVOLUTION OF WEB ARCHITECTURE AND DESIGN ....................................................... 1 1
■
State-of-the-art web design
3
2
■
Building web applications
27
3
■
Creating custom JSP tags
4
■
The Model 2 design pattern
61 91
PART II WEB FRAMEWORKS ........................................ 131 5
■
Using Struts
133
6
■
Tapestry
7
■