Tải bản đầy đủ (.pdf) (75 trang)

ECLIPSE WEB TOOLS PLATFORM developing java web applications PHẦN 1 doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (7.99 MB, 75 trang )

ECLIPSE WEB TOOLS
PLATFORM
For more information on books in this series visit www.awprofessional.com/series/eclipse
SERIES EDITORS Erich Gamma

Lee Nackman

John Wiegand
the eclipse series
Eclipse is a universal tool platform, an open extensible integrated development envi-
ronment (IDE) for anything and nothing in particular. Eclipse represents one of the
most exciting initiatives hatched from the world of application development in a
long time, and it has the considerable support of the leading companies and organ-
izations in the technology sector. Eclipse is gaining widespread acceptance in both
the commercial and academic arenas.
The Eclipse Series from Addison-Wesley is the definitive series of books dedicated
to the Eclipse platform. Books in the series promise to bring you the key technical
information you need to analyze Eclipse, high-quality insight into this powerful
technology, and the practical advice you need to build tools to support this evolu-
tionary Open Source platform. Leading experts Erich Gamma, Lee Nackman, and
John Wiegand are the series editors.
Titles in the Eclipse Series
John Arthorne and Chris Laffra
Official Eclipse 3.0 FAQs
0-321-26838-5
Frank Budinsky, David Steinberg, Ed Merks, Ray Ellersick, and Timothy J. Grose
Eclipse Modeling Framework
0-131-42542-0
David Carlson
Eclipse Distilled


0-321-28815-7
Eric Clayberg and Dan Rubel
Eclipse: Building Commercial-Quality Plug-Ins, Second Edition
0-321-42672-X
Adrian Colyer, Andy Clement, George Harley, and Matthew Webster
Eclipse AspectJ:Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools
0-321-24587-3
Erich Gamma and Kent Beck
Contributing to Eclipse: Principles, Patterns, and Plug-Ins
0-321-20575-8
Jeff McAffer and Jean-Michel Lemieux
Eclipse Rich Client Platform: Designing, Coding, and Packaging Java™ Applications
0-321-33461-2
Steve Northover and Mike Wilson
SWT:The Standard Widget Toolkit,Volume 1
0-321-25663-8
Diana Peh,Alethea Hannemann, Paul Reeves, and Nola Hague
BIRT:A Field Guide to Reporting
0-321-44259-8
Jason Weathersby, Don French,Tom Bondur, Jane Tatchell, and Iana Chatalbasheva
Integrating and Extending BIRT
0-321-44385-3
ECLIPSE WEB TOOLS
PLATFORM
DEVELOPING JAVA

WEB
APPLICATIONS
Naci Dai
Lawrence Mandel

Arthur Ryman
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
New York
• Toronto • Montreal • London • Munich • Paris • Madrid
Capetown
• Sydney • Tokyo • Singapore • Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks.
Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations
have been printed with initial capital letters or in all capitals.
The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty
of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential
damages in connection with or arising out of the use of the information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales,
which may include electronic versions and/or custom covers and content particular to your business, training goals,
marketing focus, and branding interests. For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419

For sales outside the United States please contact:
International Sales

Visit us on the Web: www.awprofessional.com
Library of Congress Cataloging-in-Publication Data
Dai, Naci.
Eclipse Web tools platform : developing Java Web applications / Naci Dai, Lawrence Mandel, Arthur Ryman.
p. cm.
Includes bibliographical references and index.
ISBN 978-0-321-39685-3 (pbk. : alk. paper) 1. Web site development 2. Java (Computer program language)
3. Internet programming. I. Mandel, Lawrence. II. Ryman, Arthur. III. Title.
TK5105.888.D32 2007

006.7'6—dc22
2007010167
Copyright © 2007 Pearson Education, Inc.
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission
must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission
in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding
permissions, write to:
Pearson Education, Inc.
Rights and Contracts Department
75 Arlington Street, Suite 300
Boston, MA 02116
Fax: (617) 848-7047
ISBN 13: 978-0-321-39685-3
ISBN 10: 0-321-39685-5
Text printed in the United States on recycled paper at Courier in Stoughton, Massachusetts.
First printing, May 2007
To my wife and best friend, Karen, who encourages and helps me in all my endeavors,
and to my daughters, Maya and Ela, for letting me use their weekends and playtime
for writing this book. I love you all.
—N.D.
To my wife, Elana, who inspires, encourages, and challenges me to try new things,
like writing this book, and to my dad, Fred (), who bought me my first
computer and who I know would have thought this stuff was so cool.
—L.M.
To my late father, Sydney Ryman, who taught me to love books and who died
peacefully at the age of 85 while I was writing this one. Dad, thank you for
all those weekend trips to the public library.
—A.R.
This page intentionally left blank
vii

Foreword xvii
Preface xix
Acknowledgments xxiii
About the Authors xxv
Part I ❍ Getting Started 1
Chapter 1 Introduction 3
Java Web Application Development and Eclipse 3
What This Book Contains 4
How This Book Is Organized 5
Source Code Examples 8
Introducing League Planet 9
Summary 10
Chapter 2 About the Eclipse Web Tools Platform Project 13
WTP Is Born 13
WTP Economics 15
Reducing Development Expense 16
Generating Revenue 19
The Structure of WTP 22
The Scope of WTP 23
WTP Subprojects 24
The Architecture of WTP 27
The WST Subproject 29
The JST Subproject 34
Contents
Contributing to WTP 37
Become a User 37
Monitor the Newsgroup 37
Report a Problem 38
Suggest an Improvement 38
Fix a Bug 39

Write an Article or Tutorial 39
Become a Committer 40
Grow the Community 40
Summary 40
Chapter 3 Quick Tour 41
Overview 41
Iteration 1: J2EE Web Applications 44
Add a Server Runtime Environment 46
Create a Dynamic Web Project 51
Create and Edit a JSP 56
Run the JSP on the Server 57
Summary of Iteration 1 60
Iteration 2: Servlets and Scriptlets 60
Add a Java Scriptlet to a JSP 60
Debug a JSP 61
Create a Servlet 64
Debug a Servlet 69
Summary of Iteration 2 70
Iteration 3: Database Access 71
Connect to a Database 72
Execute SQL Statements 75
Add Database Access to a Web Application 78
Summary of Iteration 3 82
Iteration 4: Web Services 82
Deploy a Web service 83
Use a Test Client 86
Monitor SOAP Messages 87
Summary of Iteration 4 88
Summary 88
Chapter 4 Setting Up Your Workspace 91

Installing and Updating WTP 91
The Installable Components of WTP 91
WTP Build Types 92
viii Contents
Installation via Update Manager 95
Installation via Zip Files 98
Installing Third-Party Content 100
JDK Setup 103
Verifying the Installation 103
Updating WTP 104
Configuring WTP 105
Data Preferences 107
Internet Preferences 107
Server Preferences 107
Validation Preferences 107
Web and XML Preferences 108
Web Services Preferences 108
XDoclet Preferences 109
Sharing Settings 110
Summary 110
Part II ❍ Java Web Application Development 111
Chapter 5 Web Application Architecture and Design 113
The Web Landscape 113
Web Applications 115
Java Web Applications 116
Layered Web Application Design 120
Model View Controller (MVC) for the Web 123
Java Application Frameworks 128
Service-Oriented Architecture (SOA) 130
Providing Services: The Service Layer 130

Case Study: League Planet 133
Summary 135
Chapter 6 Organizing Your Development Project 137
Web Project Types and J2EE Applications 138
Web Projects 139
J2EE Modules 140
Creating Applications 140
Creating EJB Applications 148
Creating Enterprise Applications 154
Advanced Web Projects 160
Modeling the Developer View 162
Contents ix
Example Projects 165
Basic Enterprise Application 165
Dividing a Web Module into Multiple Projects 171
Using Maven for Web Application Development 180
Summary 196
Chapter 7 The Presentation Tier 199
Introduction 199
Interaction Design 200
Graphic Design 203
The Structure of the Presentation Tier 204
Iteration 1: Static Web Projects, HTML, and the
Structured Source Editors 208
Static Web Projects 208
HTML 211
Structured Source Editors 218
Templates 221
Snippets 224
Summary of Iteration 1 230

Iteration 2: CSS 230
Summary of Iteration 2 234
Iteration 3: JavaScript 234
E-Mail Address Obfuscation 234
Data Entry Form Validation 236
Summary of Iteration 3 247
Iteration 4: XML and XSLT 248
XML 248
XSLT 252
Summary of Iteration 4 257
Iteration 5: DTD 257
Summary of Iteration 5 261
Iteration 6: Servers, Dynamic Web Projects,
and Servlets 261
Servers 261
Dynamic Web Projects 267
Servlets 270
Summary of Iteration 6 279
Iteration 7: JSP 279
Summary of Iteration 7 289
Iteration 8: Monitoring HTTP Sessions 289
HTTP Sessions 289
x Contents
The TCP/IP Monitor 290
Viewing HTTP Sessions with the TCP/IP Monitor 291
Modifying and Resending a Message 293
Summary of Iteration 8 295
Summary 295
Chapter 8 The Business Logic Tier 297
A Common Business Tier Design 300

Iteration 1: The Domain Model 301
J2EE Utility Projects 301
The Object Model 304
The Service Layer 310
The Data Access Layer 315
Testing 320
Summary of Iteration 1 324
Iteration 2: Developing Session EJBs 325
Adding JBoss 329
XDoclet 332
EJB Projects 335
Creating Session Beans 339
Building a Web Client 349
Running the Application 352
Developing EJB 3.0 with WTP 356
Summary of Iteration 2 358
Iteration 3: Message-Driven Beans 358
A Brief Introduction to MDBs 358
Create an MDB 359
Add a Queue to JBoss 363
Create a JMS Web Client 363
Summary of Iteration 3 367
Summary 367
Chapter 9 The Persistence Tier 369
Designs for the Persistence Layer 370
Use JDBC APIs to Map Objects to a Database 371
Use Entity Beans to Map Objects to a Database 372
Use Object-Relational Frameworks to Map
Objects to a Database 373
Overview of Iterations 374

Iteration 1: Creating a Database 375
Summary of Iteration 1 385
Contents xi
Iteration 2: Data Layer 386
Summary of Iteration 2 391
Iteration 3: Entity Beans 392
Preparing JBoss, Derby, and XDoclet 393
Adding a CMP 396
Adding ejbCreate and finder Methods 401
Adding the Ice Hockey CMP Data Access Object 408
Testing the CMP Implementation 410
Developing JPA with WTP 414
Summary of Iteration 3 418
Summary 418
Chapter 10 Web Services 421
WSDL 422
SOAP 423
REST 424
REST Style Web Services 426
Overview of Iterations 427
Iteration 1: Developing Web Services Top-Down 428
XSD 429
WSDL 435
Deploying Web Services 440
Implementing the Web Service 446
Testing with the Web Services Explorer 451
Summary of Iteration 1 454
Iteration 2: Developing Web Services Bottom-Up 454
Develop the Java Service Implementation 455
Deploy the Service 460

Summary of Iteration 2 462
Iteration 3: Generating Web Service Client Proxies 464
Generate a Java Client Proxy and JSP Test Client 464
Using the JSP Test Client 468
Summary of Iteration 3 470
Iteration 4: Testing Web Services for Interoperability 470
Checking Messages for WS-I Compliance 471
Summary of Iteration 4 476
Iteration 5: Using Web Services in Web Applications 477
Generate the Query Web Service Client 477
Create the Servlets 478
Import the User Interface Code 480
xii Contents
Test the User Interface 491
Summary of Iteration 5 494
Iteration 6: Discovering and Publishing Web Services 494
UDDI 495
WSIL 501
Summary of Iteration 6 508
Summary 508
Chapter 11 Testing 509
Automated Testing 511
Overview of Iterations 512
Iteration 1: Unit Testing with JUnit 512
Creating a Test Project 513
JUnit Test Case 515
JUnit Test Suite 518
Summary of Iteration 1 520
Iteration 2: Integration Testing with Cactus 520
Summary of Iteration 2 527

Iteration 3: System Testing with HttpUnit 528
Summary of Iteration 3 533
Iteration 4: Performance Testing with TPTP 533
Creating a Performance Test Project 536
HTTP Recording Test 536
Generating a Report 538
Summary of Iteration 4 539
Iteration 5: Profiling with TPTP 540
Summary of Iteration 5 545
Summary 546
Part III ❍ Extending WTP 549
Chapter 12 Adding New Servers 551
Overview of Adding a Generic Server Adapter 554
The GlassFish Server Runtime 554
Server Adapter Plug-ins 556
Adding Support for a New Server Runtime 558
Adding a New Server Type for a Runtime 561
Adding a New Runtime Target Handler 562
Facets and Runtime Components 563
Contents xiii
Extending the Server Tools UI 565
The Generic Server Definition 566
Publishers 570
Testing the Server Adapter 573
Summary 580
Chapter 13 Supporting New File Types 583
Creating the DocBook Extension Plug-in 585
The DocBook Validator 585
The WTP Validation Framework 586
Implementing the DocBook Validator 587

Creating a Custom Marker Type 598
Declaring the DocBook Content Type 601
Summary 605
Chapter 14 Creating WSDL Extensions 607
Creating the WSDL Extension Plug-in 612
Extending the WSDL Editor 612
Customizing the Look of Extensibility
Elements in the Editor’s Design View 614
Adding Extensibility Elements to the Editor 617
Adding Custom Actions to the WSDL Editor
Design View 627
Extending WSDL Validation 635
Contributing to WSDL 1.1 Validation 636
Contributing Custom Validation Rules 640
Summary 644
Chapter 15 Customizing Resource Resolution 645
Creating the Resource Resolution Extension Plug-in 647
Contributing Resources to the XML Catalog 648
The XML Catalog 650
Adding a Single Resource to the XML Catalog 651
Adding a Catalog of Resources to the XML
Catalog 654
Implementing a Custom Resource Resolution Strategy 657
The URI Resolution Framework 659
Creating the Folder URI Resolver 661
Summary 665
xiv Contents
Part IV ❍ Products and Plans 667
Chapter 16 Other Web Tools Based on Eclipse 669
Java Web Tools 669

BEA Workshop 670
CodeGear JBuilder 670
Exadel Studio 670
IBM Rational Application Developer for
WebSphere Software 670
JBoss IDE for Eclipse 671
MyEclipse 672
ObjectWeb Lomboz 672
SAP NetWeaver Developer Studio 672
W4T Eclipse 672
Perl Web Tools 674
EPIC 674
PHP Web Tools 674
Eclipse PHP Development Tools Project 674
PHPEclipse 674
Python Web Tools 675
PyDev 675
Ruby Web Tools 675
RadRails 675
Summary 675
Chapter 17 The Road Ahead 677
Eclipse Data Tools Platform (DTP) Project 678
Eclipse JavaServer Faces (JSF) Tools Project 678
Eclipse Dali Java Persistence Architecture (JPA)
Tools Project 679
Eclipse AJAX Tools Framework (ATF) Project 679
Java Enterprise Edition 5 679
Apache Axis2 and W3C WSDL 2.0 680
Eclipse PHP Development Tools Project 680
Eclipse SOA Tools Platform (STP) Project 681

Conclusion 681
Glossary 683
References 689
Index 697
Contents xv
This page intentionally left blank
Foreword
xvii
The Web Tools Platform (WTP) Project is, in many ways, an Eclipse success
story. The goal of the Eclipse community and the Eclipse Foundation is twofold:
to cultivate both an Open Source community and an ecosystem of complemen-
tary products, capabilities, and services. Over the past two years, this project has
made great progress on both fronts. WTP has been adopted by a broad cross-
section of the industry as the platform for their Java EE and Web tools: BEA
WebLogic Workshop, CodeGear JBuilder, Genuitec’s MyEclipse, IBM Rational
Application Developer, JBoss IDE, and SAP NetWeaver, to name just a few of the
prominent ones. (You can read the full list in Chapter 16.) By any measure, WTP
has been very successful in achieving its goal of providing a common tool infra-
structure for the Java EE development world.
On the Open Source project side, WTP has garnered contributions from
many organizations and companies. To list just a few of the prominent ones:
WTP has active participation from ObjectWeb Lomboz developers such as Naci
Dai, it has been ably led by Tim Wagner from BEA, it has seen contributions of
code and committers from Oracle in both the JavaServer Faces (JSF) and object-
relational persistence (Dali ORM), and—last but not least—has had major sup-
port from IBM in terms of code, committers, and leadership from Lawrence
Mandel, Arthur Ryman, David Williams, and others. For the full story, I highly
recommend reading the WTP Is Born section in Chapter 2.
In short, Web Tools has been a wonderful community effort, an effort that
has been rewarded with many shipped products. And in the Eclipse community,

this is truly the measure of a successful project.
The simple fact that so many organizations—many of them fierce competi-
tors in the marketplace—cooperate on the development of WTP and ship prod-
ucts on top of it is a testament to the WTP project leadership. It is also one of the
strongest proof-points that the Eclipse community’s model of “collaborate on
the platform and compete on the product’’ is the correct one for today’s world of
highly complex software, faster time-to-market requirements, and shrinking
development budgets. Each of the products listed earlier (WebLogic Workshop,
RAD, JBuilder, NetWeaver, and so forth) is highly differentiated, yet they share
the same Eclipse Web Tools Platform base.
Since the project’s inception, the WTP team has been working toward creat-
ing both a strong set of tools for developer productivity and a stable platform on
top of which tool builders can ship products. Neither of these are simple goals,
and that WTP has been successful on both fronts speaks volumes about the hard
work of the committers on the project. Both topics are covered in the book, with
Part II focusing on using the tools, and Part III describing how to extend WTP
for additional servers, filetypes, and the like.
I hope Eclipse Web Tools Platform: Developing Java Web Applications will
make you a more productive Java developer. Please pay special attention to the
Contributing to WTP section in Chapter 2. Eclipse is all about active community
involvement, and we hope to welcome you soon as an active contributor to WTP
and other projects at Eclipse. As you work with WTP and the capabilities
described in this book, I’d encourage you to communicate your successes back to
the community, and perhaps consider contributing any interesting extensions
you may develop. The WTP Web site may be found at
/>It includes pointers to the WTP newsgroup, where you can communicate
and share your results with other WTP developers, and pointers to the Eclipse
installation of Bugzilla, where you can contribute your extensions.
—Mike Milinkovich
Executive Director

Eclipse Foundation
xviii Foreword
Preface
xix
Our goal in writing this book was to help build the community around the Eclipse
Web Tools Platform (WTP) Project. We decided to write this book soon after
WTP was approved by the Eclipse Foundation. At that time, the project was in its
formative stages and there was virtually nothing written about WTP. We believed
that a book on how to use and extend WTP would help promote its adoption.
We naively hoped that we would have this book finished soon after WTP 0.7
was released in July 2005. However, since we were all actively engaged in devel-
oping WTP, work on this book got delayed. Also, many significant changes in the
design of WTP were planned, so we felt it was better to have the book describe
the next major version, WTP 1.5, which was part of the Eclipse 3.2 Callisto
simultaneous release in June 2006.
Allowing WTP to mature also gave us more time to develop and refine the
material in this book. Much of the material in this book has been test-driven at sev-
eral major software development conferences including EclipseCon, EclipseWorld,
Rational Software Development Conference, and Colorado Software Summit.
Attendees at those events provided valuable feedback that has improved the con-
tent of this book.
Since the WTP 1.5 release, there has been increasing adoption of WTP by
both commercial and Open Source tool developers. This activity has generated a
stream of maintenance releases. As we went into production, this book accu-
rately reflected the content of WTP 1.5.2, but by the time it appears in print, the
latest release should be WTP 1.5.3. However, each maintenance release should
only contain bug fixes and not affect the user interface. This book should there-
fore also be accurate for WTP 1.5.3 and future maintenance releases. And
although WTP 2.0, which is planned for June 2007, will certainly contain many
enhancements, we expect that most of the content of this book will still be valid.

About This Book
This book is divided into four parts: Getting Started, Java Web Application
Development, Extending WTP, and Products and Plans.
In Part I, Getting Started, we introduce you to WTP. We give a brief overview
of the history and architecture of the project and discuss how you can contribute to
its development. By being an active contributor as well as a user, you can help
improve WTP and ensure its long-term success. We also introduce you to League
Planet, a fictitious amateur sport Web site, which serves as the inspiration for the
programming examples in the rest of the book. Next we take you on a Quick Tour
of WTP in which you build a simple Web application that includes dynamic content
generated by servlets and JSPs running on Tomcat, JDBC database access to Derby,
and Web services running on Axis. We conclude with a detailed discussion of how
to install WTP and tailor it to your needs using its many preferences. At the end of
this part, you’ll be able to start building your own Java Web applications with WTP.
Part II, Java Web Application Development, is for Java Web application
developers. We describe the architecture of Java Web applications and how to
build them using WTP. We start with a discussion of how to set up your project,
including the use of Maven for automated builds. We then discuss architecture in
some detail. Java Web applications have a multi-tiered architecture, and each of
the presentation, business logic, and persistence tiers is addressed in its own
chapter. The presentation tier chapter covers tools for HTML, CSS, JavaScript,
XML, DTD, and XSLT. The business logic tier chapter discusses tools for EJBs
and XDoclet. The persistence tier chapter describes tools for SQL. Next we focus
on developing Web services, including tools for SOAP, WSDL, XSD, and UDDI.
We close with a discussion of testing, including JUnit, Cactus, HttpUnit, and the
Eclipse Test and Performance Tools Platform (TPTP).
In Part III, Extending WTP, we shift attention to developing Eclipse plug-ins that
extend WTP. This part of the book is aimed at tool developers. WTP contains many
plug-ins and extension points, so the coverage here serves mainly to illustrate the
process. A comprehensive treatment of all the APIs in WTP would itself fill several

books. We start with the important example of adding a new server runtime to
WTP, and illustrate this by adding support for GlassFish, the reference implementa-
tion for Java Enterprise Edition 5 (Java EE 5). Next, we show how to add support
for new file types and do so for DocBook, the XML format used for authoring
books (such as this one). We follow that by describing how to support new WSDL
extensions and add a new SOAP binding as an example. We conclude this subject
by extending the URI resolution framework, which enables XML processors to
locate resources.
The book wraps up with Part IV, Products and Plans. We begin with a brief
survey of commercial and Open Source Eclipse-based Web development products
xx Preface
that can be used with WTP. Although WTP contains a core set of useful tools, it is
also a platform intended to be built on by others. After you master WTP, you may
find that your tool needs are not fully satisfied. Perhaps you want to develop with
Struts, Hibernate, or Spring. Or you may want to use a different Web development
language, such as PHP, Python, or Ruby, in conjunction with Java. Fortunately,
there are many products available to round out your Web development IDE. We
end the book with a preview of functions we expect to be added to WTP in future
releases. WTP is currently hosting subprojects for JavaServer Faces (JSF), Java
Persistence Architecture (Dali), and AJAX (ATF). In addition, WTP is planning
tighter integration with other Eclipse projects, as well as support for Java EE 5. Of
course, the future of WTP largely depends on you. By becoming an active user and
contributor, you will influence the continuing support and evolution of WTP.
Audience
This book is primarily written for Java Web application developers. We assume
that you have a working knowledge of Java programming and some experience
using Eclipse. There are many excellent books available that cover both topics.
Some experience in Java Web application development is also desirable. We
have made an attempt to introduce the subject of Java Web application devel-
opment in addition to describing the tools available in WTP. Although this

book deals with WTP, it will also be of use to users of products built on WTP.
And remember, one of the best ways you can contribute to WTP is by report-
ing bugs. If you hit a bug while using WTP, please report it to the Eclipse
Bugzilla system at
/>This book also includes material for Eclipse plug-in developers who want to
extend WTP. Experience in plug-in development is assumed. Several available
books cover the topic of Eclipse plug-in development for those who need some
background information. Although we expect commercial and Open Source proj-
ects to extend WTP, we also expect individuals to do so. If you develop a cool
plug-in that fits within the scope of the WTP charter, please consider contributing
it to WTP. To do so, start by sending a note to the WTP developers mailing list at
<>
Sample Code
The Web site for this book is located at

Preface xxi
All of the example code used throughout this book can be downloaded from
there. The site will also provide an errata list, and other news related to the book.
The following Eclipse components are required to run the examples in this
book:
❍ Eclipse Software Development Kit (SDK), Version 3.2
❍ Eclipse Modeling Framework (EMF), Version 2.2
❍ Graphical Editing Framework (GEF), Version 3.2
❍ Java Edit Model (JEM), Version 1.2
❍ Web Tools Platform (WTP), Version 1.5
All of the above are available from
/>Conventions
We use a sans serif font for user interface elements such as menu items, buttons,
and labels. We use a monospace font for programmatic elements such as file
names, source code listings, URLs, package names, and XML content. Examples

of these conventions are listed below.
❍ buttons, e.g., Submit
❍ class names, e.g., LoginServlet
❍ code, e.g., out.println("Hello, world");
❍ email addresses, e.g., <>
❍ file names, e.g., web.xml
❍ labels, e.g., Servers
❍ menu items, e.g., File ᭤ New ᭤ Project
❍ method names, e.g., getParameter()
❍ URLs, e.g.,
Feedback
We’ve set up an e-mail address to receive feedback about this book. Please send
your comments on this book to
<>
xxii Preface
Acknowledgments
We’d like to begin by thanking the people who directly contributed to the prepa-
ration of this book. Our technical reviewers, Simon Archer, John Arthorne,
Michael Elder, Jane Fung, Daniel Holt, and Kimberley Peter, gave us highly valu-
able, in-depth comments that greatly improved the contents of this book. Mike
Milinkovich graciously provided us with an inspiring Foreword. We received
authoritative feedback on the accuracy of the project and product descriptions
contained in Chaper 16, Other Web Tools Based on Eclipse, from Jens Eckels,
Matthew Gammie, Axel Kramer, Jochen Krause, Kyle Shank, Greg Stachnick,
and Fabio Zadrozny. And, of course, Greg Doench and Michelle Housely, our
wonderful editors at Addison-Wesley, were a continuous source of support and
encouragement. We are grateful to you all.
We would also like to acknowledge our fellow members of the WTP develop-
ment project, since their contributions gave us something well worth writing about.
WTP was created as the result of a three-way collaboration between IBM,

ObjectWeb, and the Eclipse Foundation. From IBM, we’d like to thank the exec-
utive team of Lee Nackman, Hayden Lindsey, and Karen Hunt for approving the
contribution of part of Rational Application Developer V6.0 and supporting its
ongoing development in WTP. Also at IBM, we’d like to thank Dave Thomson,
John Wiegand, and Scott Rich for contributing to the initial formulation of the
project. At ObjectWeb, we’d like to thank Christophe Ney for leading the proj-
ect creation effort. Christophe was instrumental in enabling the contribution of
Lomboz from eteration, a member of ObjectWeb. At Eclipse, we’d like to thank
Mike Milinkovich for supporting the creation of WTP, and John Wiegand and
Bjorn Freeman-Benson for shepherding WTP through the creation process.
Next, we’d like to thank the WTP leadership team. Bjorn Freeman-Benson,
Christophe Ney, and Tim Wagner co-led the Project Management Committee
(PMC); Dominique de Vito, Jochen Krause, Mitch Sonies, Raghu Srinivasan, and
xxiii
David Williams served on the PMC; Chris Brealey, Chuck Bridgham, Der-Ping
Chou, Tim de Boer, Craig Salter, Sheila Sholars, and David Williams led compo-
nent teams; and Jeffrey Liu was the lead release engineer.
Finally, we would like to thank all of the many committers and contributors
who have made WTP such a memorable experience and huge success. For the
complete list, see
/>xxiv Acknowledgments

×