Table of Contents
|
xvii
xix
xxiii
xxv
1
Part I - Getting Started
3
3
Java Web Application Development and Eclipse
4
What This Book Contains
5
How This Book Is Organized
8
Source Code Examples
9
Introducing League Planet
10
Summary
13
13
WTP Is Born
15
WTP Economics
16
Reducing Development Expense
19
Generating Revenue
22
The Structure of WTP
23
The Scope of WTP
24
WTP Subprojects
27
The Architecture of WTP
29
The WST Subproject
34
The JST Subproject
37
Contributing to WTP
37
Become a User
37
Monitor the Newsgroup
38
Report a Problem
38
Suggest an Improvement
39
Fix a Bug
39
Write an Article or Tutorial
40
Become a Committer
40
Grow the Community
40
Summary
41
41
Overview
44
Iteration 1: J2EE Web Applications
46
Add a Server Runtime Environment
51
Create a Dynamic Web Project
56
Create and Edit a JSP
57
Run the JSP on the Server
60
Summary of Iteration 1
60
Iteration 2: Servlets and Scriptlets
60
Add a Java Scriptlet to a JSP
61
Debug a JSP
64
Create a Servlet
69
Debug a Servlet
70
Summary of Iteration 2
71
Iteration 3: Database Access
72
Connect to a Database
75
Execute SQL Statements
78
Add Database Access to a Web Application
82
Summary of Iteration 3
82
Iteration 4: Web Services
83
Deploy a Web service
86
Use a Test Client
87
Monitor SOAP Messages
88
Summary of Iteration 4
88
Summary
91
91
Installing and Updating WTP
91
The Installable Components of WTP
92
WTP Build Types
95
Installation via Update Manager
98
Installation via Zip Files
100
Installing Third-Party Content
103
JDK Setup
103
Verifying the Installation
104
Updating WTP
105
Configuring WTP
107
Data Preferences
107
Internet Preferences
107
Server Preferences
108
Validation Preferences
108
Web and XML Preferences
108
Web Services Preferences
109
XDoclet Preferences
110
Sharing Settings
110
Summary
111
Part II - Java Web Application Development
113
113
The Web Landscape
115
Web Applications
116
Java Web Applications
120
Layered Web Application Design
123
Model View Controller (MVC) for the Web
128
Java Application Frameworks
130
Service-Oriented Architecture (SOA)
130
Providing Services: The Service Layer
133
Case Study: League Planet
135
Summary
137
138
Web Project Types and J2EE Applications
139
Web Projects
140
J2EE Modules
140
Creating Applications
148
Creating EJB Applications
154
Creating Enterprise Applications
160
Advanced Web Projects
162
Modeling the Developer View
165
Example Projects
165
Basic Enterprise Application
171
Dividing a Web Module into Multiple Projects
180
Using Maven for Web Application Development
196
Summary
199
199
Introduction
200
Interaction Design
203
Graphic Design
204
The Structure of the Presentation Tier
208
Iteration 1: Static Web Projects, HTML, and the Structured Source Editors
208
Static Web Projects
211
HTML
218
Structured Source Editors
221
Templates
224
Snippets
230
Summary of Iteration 1
230
Iteration 2: CSS
234
Summary of Iteration 2
234
Iteration 3: JavaScript
234
E-Mail Address Obfuscation
236
Data Entry Form Validation
247
Summary of Iteration 3
248
Iteration 4: XML and XSLT
248
XML
252
XSLT
257
Summary of Iteration 4
257
Iteration 5: DTD
261
Summary of Iteration 5
261
Iteration 6: Servers, Dynamic Web Projects, and Servlets
261
Servers
267
Dynamic Web Projects
270
Servlets
279
Summary of Iteration 6
279
Iteration 7: JSP
289
Summary of Iteration 7
289
Iteration 8: Monitoring HTTP Sessions
289
HTTP Sessions
290
The TCP/IP Monitor
291
Viewing HTTP Sessions with the TCP/IP Monitor
293
Modifying and Resending a Message
295
Summary of Iteration 8
295
Summary
297
300
A Common Business Tier Design
301
Iteration 1: The Domain Model
301
J2EE Utility Projects
304
The Object Model
310
The Service Layer
315
The Data Access Layer
320
Testing
324
Summary of Iteration 1
325
Iteration 2: Developing Session EJBs
329
Adding JBoss
332
XDoclet
335
EJB Projects
339
Creating Session Beans
349
Building a Web Client
352
Running the Application
356
Developing EJB 3.0 with WTP
358
Summary of Iteration 2
358
Iteration 3: Message-Driven Beans
358
A Brief Introduction to MDBs
359
Create an MDB
363
Add a Queue to JBoss
363
Create a JMS Web Client
367
Summary of Iteration 3
367
Summary
369
370
Designs for the Persistence Layer
371
Use JDBC APIs to Map Objects to a Database
372
Use Entity Beans to Map Objects to a Database
373
Use Object-Relational Frameworks to Map Objects to a Database
374
Overview of Iterations
375
Iteration 1: Creating a Database
385
Summary of Iteration 1
386
Iteration 2: Data Layer
391
Summary of Iteration 2
392
Iteration 3: Entity Beans
393
Preparing JBoss, Derby, and XDoclet
396
Adding a CMP
401
Adding ejbCreate and finder Methods
408
Adding the Ice Hockey CMP Data Access Object
410
Testing the CMP Implementation
414
Developing JPA with WTP
418
Summary of Iteration 3
418
Summary
421
422
WSDL
423
SOAP
424
REST
426
REST Style Web Services
427
Overview of Iterations
428
Iteration 1: Developing Web Services Top-Down
429
XSD
435
WSDL
440
Deploying Web Services
446
Implementing the Web Service
451
Testing with the Web Services Explorer
454
Summary of Iteration 1
454
Iteration 2: Developing Web Services Bottom-Up
455
Develop the Java Service Implementation
460
Deploy the Service
462
Summary of Iteration 2
464
Iteration 3: Generating Web Service Client Proxies
464
Generate a Java Client Proxy and JSP Test Client
468
Using the JSP Test Client
470
Summary of Iteration 3
470
Iteration 4: Testing Web Services for Interoperability
471
Checking Messages for WS-I Compliance
476
Summary of Iteration 4
477
Iteration 5: Using Web Services in Web Applications
477
Generate the Query Web Service Client
478
Create the Servlets
480
Import the User Interface Code
491
Test the User Interface
494
Summary of Iteration 5
494
Iteration 6: Discovering and Publishing Web Services
495
UDDI
501
WSIL
508
Summary of Iteration 6
508
Summary
509
511
Automated Testing
512
Overview of Iterations
512
Iteration 1: Unit Testing with JUnit
513
Creating a Test Project
515
JUnit Test Case
518
JUnit Test Suite
520
Summary of Iteration 1
520
Iteration 2: Integration Testing with Cactus
527
Summary of Iteration 2
528
Iteration 3: System Testing with HttpUnit
533
Summary of Iteration 3
533
Iteration 4: Performance Testing with TPTP
536
Creating a Performance Test Project
536
HTTP Recording Test
538
Generating a Report
539
Summary of Iteration 4
540
Iteration 5: Profiling with TPTP
545
Summary of Iteration 5
546
Summary
549
Part III - Extending WTP
551
554
Overview of Adding a Generic Server Adapter
554
The GlassFish Server Runtime
556
Server Adapter Plug-ins
558
Adding Support for a New Server Runtime
561
Adding a New Server Type for a Runtime
562
Adding a New Runtime Target Handler
563
Facets and Runtime Components
565
Extending the Server Tools UI
566
The Generic Server Definition
570
Publishers
573
Testing the Server Adapter
580
Summary
583
585
Creating the DocBook Extension Plug-in
585
The DocBook Validator
586
The WTP Validation Framework
587
Implementing the DocBook Validator
598
Creating a Custom Marker Type
601
Declaring the DocBook Content Type
605
Summary
607
612
Creating the WSDL Extension Plug-in
612
Extending the WSDL Editor
614
Customizing the Look of Extensibility Elements in the Editor's Design View
617
Adding Extensibility Elements to the Editor
627
Adding Custom Actions to the WSDL Editor Design View
635
Extending WSDL Validation
636
Contributing to WSDL 1.1 Validation
640
Contributing Custom Validation Rules
644
Summary
645
647
Creating the Resource Resolution Extension Plug-in
648
Contributing Resources to the XML Catalog
650
The XML Catalog
651
Adding a Single Resource to the XML Catalog
654
Adding a Catalog of Resources to the XML Catalog
657
Implementing a Custom Resource Resolution Strategy
659
The URI Resolution Framework
661
Creating the Folder URI Resolver
665
Summary
667
Part IV - Products and Plans
669
669
Java Web Tools
670
BEA Workshop
670
CodeGear JBuilder
670
Exadel Studio
670
IBM Rational Application Developer for WebSphere Software
671
JBoss IDE for Eclipse
672
MyEclipse
672
ObjectWeb Lomboz
672
SAP NetWeaver Developer Studio
672
W4T Eclipse
674
Perl Web Tools
674
EPIC
674
PHP Web Tools
674
Eclipse PHP Development Tools Project
674
PHPEclipse
675
Python Web Tools
675
PyDev
675
Ruby Web Tools
675
RadRails
675
Summary
677
678
Eclipse Data Tools Platform (DTP) Project
678
Eclipse JavaServer Faces (JSF) Tools Project
679
Eclipse Dali Java Persistence Architecture (JPA) Tools Project
679
Eclipse AJAX Tools Framework (ATF) Project
679
Java Enterprise Edition 5
680
Apache Axis2 and W3C WSDL 2.0
680
Eclipse PHP Development Tools Project
681
Eclipse SOA Tools Platform (STP) Project
681
Conclusion
683
Glossary
689
697
Index







