100% found this document useful (1 vote)
6 views

The Java EE 5 Tutorial 2nd ed Edition Eric Jendrock instant download

The document is a download link for the 'Java EE 5 Tutorial 2nd Edition' by Eric Jendrock, which is a comprehensive guide to Java EE 5 development. It includes various chapters covering topics such as web applications, servlets, JavaServer Pages, and application deployment. The tutorial is intended for developers looking to understand and utilize Java EE technologies effectively.

Uploaded by

axinlaanus
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
6 views

The Java EE 5 Tutorial 2nd ed Edition Eric Jendrock instant download

The document is a download link for the 'Java EE 5 Tutorial 2nd Edition' by Eric Jendrock, which is a comprehensive guide to Java EE 5 development. It includes various chapters covering topics such as web applications, servlets, JavaServer Pages, and application deployment. The tutorial is intended for developers looking to understand and utilize Java EE technologies effectively.

Uploaded by

axinlaanus
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

The Java EE 5 Tutorial 2nd ed Edition Eric

Jendrock pdf download

https://ebookfinal.com/download/the-java-ee-5-tutorial-2nd-ed-
edition-eric-jendrock/

Explore and download more ebooks or textbooks


at ebookfinal.com
We have selected some products that you may be interested in
Click the link to download now or visit ebookfinal.com
for more options!.

Java EE 5 Development using GlassFish Application Server


1st Ed. Edition David R. Heffelfinger

https://ebookfinal.com/download/java-ee-5-development-using-glassfish-
application-server-1st-ed-edition-david-r-heffelfinger/

Java EE Development with Eclipse 2nd Edition Ram Kulkarni

https://ebookfinal.com/download/java-ee-development-with-eclipse-2nd-
edition-ram-kulkarni/

Java EE 6 Pocket Guide 1st Edition Arun Gupta

https://ebookfinal.com/download/java-ee-6-pocket-guide-1st-edition-
arun-gupta/

Beginning EJB 3 Java EE 7 edition Jonathan Wetherbee

https://ebookfinal.com/download/beginning-ejb-3-java-ee-7-edition-
jonathan-wetherbee/
Java EE 7 Development with NetBeans 8 3rd Edition David R.
Heffelfinger

https://ebookfinal.com/download/java-ee-7-development-with-
netbeans-8-3rd-edition-david-r-heffelfinger/

Java EE 7 Recipes A Problem Solution Approach 1st Edition


Josh Juneau (Auth.)

https://ebookfinal.com/download/java-ee-7-recipes-a-problem-solution-
approach-1st-edition-josh-juneau-auth/

Java 1 5 Tiger A Developer s Notebook 1st ed Edition David


Flanagan

https://ebookfinal.com/download/java-1-5-tiger-a-developer-s-
notebook-1st-ed-edition-david-flanagan/

Java in a nutshell 2nd ed Edition David Flanagan

https://ebookfinal.com/download/java-in-a-nutshell-2nd-ed-edition-
david-flanagan/

Java Concepts Compatible with Java 5 6 and 7 6th Edition


Cay S. Horstmann

https://ebookfinal.com/download/java-concepts-compatible-with-
java-5-6-and-7-6th-edition-cay-s-horstmann/
The Java EE 5 Tutorial 2nd ed Edition Eric Jendrock
Digital Instant Download
Author(s): Eric Jendrock
ISBN(s): 9780321490292, 0321490290
Edition: 2nd ed
File Details: PDF, 8.88 MB
Year: 2006
Language: english
The Java™ EE 5
Tutorial

For Sun Java System Application Server Platform Edition 9

Jennifer Ball
Debbie Bode Carson
Ian Evans
Kim Haase
Eric Jendrock

May 10, 2006


Copyright © 2006 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A.
All rights reserved.U.S. Government Rights - Commercial software. Government users are subject to the
Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supple-
ments.

This distribution may include materials developed by third parties.


Sun, Sun Microsystems, the Sun logo, Java, JavaBeans, JavaServer, JavaServer Pages, Enterprise Java-
Beans, Java Naming and Directory Interface, JavaMail, JDBC, EJB, JSP, J2EE, J2SE, “Write Once, Run
Anywhere”, and the Java Coffee Cup logo are trademarks or registered trademarks of Sun Microsystems,
Inc. in the U.S. and other countries.
Unless otherwise licensed, software code in all technical materials herein (including articles, FAQs, sam-
ples) is provided under this License.
Products covered by and information contained in this service manual are controlled by U.S. Export Con-
trol laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical
biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly pro-
hibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export
exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is
strictly prohibited.
DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MER-
CHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE
LEGALLY INVALID.

Copyright © 2006 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, États-
Unis. Tous droits réservés.
Droits du gouvernement américain, utlisateurs gouvernmentaux - logiciel commercial. Les utilisateurs
gouvernmentaux sont soumis au contrat de licence standard de Sun Microsystems, Inc., ainsi qu aux dis-
positions en vigueur de la FAR [ (Federal Acquisition Regulations) et des suppléments à celles-ci.
Cette distribution peut comprendre des composants développés pardes tierces parties.
Sun, Sun Microsystems, le logo Sun, Java, JavaBeans, JavaServer, JavaServer Pages, Enterprise Java-
Beans, Java Naming and Directory Interface, JavaMail, JDBC, EJB, JSP, J2EE, J2SE, “Write Once, Run
Anywhere”, et le logo Java Coffee Cup sont des marques de fabrique ou des marques déposées de Sun
Microsystems, Inc. aux États-Unis et dans d’autres pays.
A moins qu’autrement autorisé, le code de logiciel en tous les matériaux techniques dans le présent (arti-
cles y compris, FAQs, échantillons) est fourni sous ce permis.
Les produits qui font l’objet de ce manuel d’entretien et les informations qu’il contient sont régis par la
législation américaine en matière de contrôle des exportations et peuvent être soumis au droit d’autres
pays dans le domaine des exportations et importations. Les utilisations finales, ou utilisateurs finaux, pour
des armes nucléaires, des missiles, des armes biologiques et chimiques ou du nucléaire maritime, directe-
ment ou indirectement, sont strictement interdites. Les exportations ou réexportations vers des pays sous
embargo des États-Unis, ou vers des entités figurant sur les listes d’exclusion d’exportation américaines,
y compris, mais de manière non exclusive, la liste de personnes qui font objet d’un ordre de ne pas partic-
iper, d’une façon directe ou indirecte, aux exportations des produits ou des services qui sont régi par la
législation américaine en matière de contrôle des exportations ("U .S. Commerce Department’s Table of
Denial Orders "et la liste de ressortissants spécifiquement désignés ("U.S. Treasury Department of Spe-
cially Designated Nationals and Blocked Persons "),, sont rigoureusement interdites.

LA DOCUMENTATION EST FOURNIE "EN L’ÉTAT" ET TOUTES AUTRES CONDITIONS, DEC-


LARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE
GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L’APTITUDE A UNE
UTILISATION PARTICULIERE OU A L’ABSENCE DE CONTREFAÇON.
Contents
About This Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Who Should Use This Tutorial xxvii
Prerequisites xxvii
How to Read This Tutorial xxviii
About the Examples xxx
Further Information xxxiv
How to Print This Tutorial xxxiv
Typographical Conventions xxxiv
Feedback xxxv

Chapter 1: Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Java EE Application Model 2
Distributed Multitiered Applications 3
Security 4
Java EE Components 5
Java EE Clients 5
Web Components 7
Business Components 8
Enterprise Information System Tier 9
Java EE Containers 9
Container Services 10
Container Types 11
Web Services Support 12
XML 12
SOAP Transport Protocol 13
WSDL Standard Format 13
UDDI and ebXML Standard Formats 14
Java EE Application Assembly and Deployment 14
Packaging Applications 14
iii
iv CONTENTS

Development Roles 16
Java EE Product Provider 16
Tool Provider 17
Application Component Provider 17
Application Assembler 18
Application Deployer and Administrator 18
Java EE 5 APIs 19
Enterprise JavaBeans Technology 20
Java Servlet Technology 20
JavaServer Pages Technology 20
JavaServer Pages Standard Tag Library 20
JavaServer Faces 21
Java Message Service API 21
Java Transaction API 22
JavaMail API 22
JavaBeans Activation Framework 22
Java API for XML Processing 22
Java API for XML Web Services (JAX-WS) 23
Java Architecture for XML Binding (JAXB) 23
SOAP with Attachments API for Java 23
Java API for XML Registries 24
J2EE Connector Architecture 24
Java Database Connectivity API 24
Java Persistence API 25
Java Naming and Directory Interface 25
Java Authentication and Authorization Service 26
Simplified Systems Integration 26
Sun Java System Application Server Platform Edition 9 27
Tools 27
Starting and Stopping the Application Server 28
Starting the Admin Console 29
Starting and Stopping the Java DB Database Server 30
Debugging Java EE Applications 30

Part One: The Web Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33

Chapter 2: Getting Started with Web Applications. . . . . . . . . .35


Web Application Life Cycle 38
Web Modules 40
Packaging Web Modules 42
Deploying a WAR File 43
CONTENTS v

Testing Deployed Web Modules 44


Listing Deployed Web Modules 44
Updating Web Modules 45
Undeploying Web Modules 47
Configuring Web Applications 48
Mapping URLs to Web Components 48
Declaring Welcome Files 49
Setting Initialization Parameters 50
Mapping Errors to Error Screens 50
Declaring Resource References 51
Duke’s Bookstore Examples 54
Accessing Databases from Web Applications 54
Populating the Example Database 55
Creating a Data Source in the Application Server 55
Further Information 56

Chapter 3: Java Servlet Technology . . . . . . . . . . . . . . . . . . . . . 57


What Is a Servlet? 57
The Example Servlets 58
Troubleshooting 60
Servlet Life Cycle 61
Handling Servlet Life-Cycle Events 61
Handling Errors 64
Sharing Information 64
Using Scope Objects 64
Controlling Concurrent Access to Shared Resources 65
Accessing Databases 67
Initializing a Servlet 68
Writing Service Methods 69
Getting Information from Requests 70
Constructing Responses 72
Filtering Requests and Responses 75
Programming Filters 75
Programming Customized Requests and Responses 77
Specifying Filter Mappings 80
Invoking Other Web Resources 82
Including Other Resources in the Response 82
Transferring Control to Another Web Component 84
Accessing the Web Context 85
Maintaining Client State 86
vi CONTENTS

Accessing a Session 86
Associating Objects with a Session 86
Session Management 87
Session Tracking 88
Finalizing a Servlet 89
Tracking Service Requests 89
Notifying Methods to Shut Down 90
Creating Polite Long-Running Methods 91
Further Information 92

Chapter 4: JavaServer Pages Technology . . . . . . . . . . . . . . . .93


What Is a JSP Page? 93
Example 94
The Example JSP Pages 97
The Life Cycle of a JSP Page 102
Translation and Compilation 102
Execution 103
Creating Static Content 105
Response and Page Encoding 105
Creating Dynamic Content 106
Using Objects within JSP Pages 106
Unified Expression Language 107
Immediate and Deferred Evaluation Syntax 110
Value and Method Expressions 111
Defining a Tag Attribute Type 118
Deactivating Expression Evaluation 119
Literal Expressions 121
Resolving Expressions 122
Implicit Objects 125
Operators 126
Reserved Words 127
Examples 127
Functions 129
JavaBeans Components 130
JavaBeans Component Design Conventions 131
Creating and Using a JavaBeans Component 132
Setting JavaBeans Component Properties 133
Retrieving JavaBeans Component Properties 136
Using Custom Tags 136
Declaring Tag Libraries 137
CONTENTS vii

Including the Tag Library Implementation 139


Reusing Content in JSP Pages 139
Transferring Control to Another Web Component 140
jsp:param Element 141
Including an Applet 141
Setting Properties for Groups of JSP Pages 144
Further Information 147

Chapter 5: JavaServer Pages Documents . . . . . . . . . . . . . . . 149


The Example JSP Document 150
Creating a JSP Document 152
Declaring Tag Libraries 154
Including Directives in a JSP Document 156
Creating Static and Dynamic Content 158
Using the jsp:root Element 161
Using the jsp:output Element 162
Identifying the JSP Document to the Container 166

Chapter 6: JavaServer Pages Standard Tag Library . . . . . . . 167


The Example JSP Pages 168
Using JSTL 169
Tag Collaboration 170
Core Tag Library 172
Variable Support Tags 172
Flow Control Tags 174
URL Tags 177
Miscellaneous Tags 178
XML Tag Library 180
Core Tags 181
Flow Control Tags 182
Transformation Tags 183
Internationalization Tag Library 184
Setting the Locale 185
Messaging Tags 185
Formatting Tags 186
SQL Tag Library 187
query Tag Result Interface 189
Functions 191
Further Information 192
viii CONTENTS

Chapter 7: Custom Tags in JSP Pages . . . . . . . . . . . . . . . . . . .195


What Is a Custom Tag? 196
The Example JSP Pages 196
Types of Tags 199
Tags with Attributes 199
Tags with Bodies 202
Tags That Define Variables 203
Communication between Tags 203
Encapsulating Reusable Content Using Tag Files 204
Tag File Location 206
Tag File Directives 206
Evaluating Fragments Passed to Tag Files 215
Examples 215
Tag Library Descriptors 220
Top-Level Tag Library Descriptor Elements 221
Declaring Tag Files 222
Declaring Tag Handlers 225
Declaring Tag Attributes for Tag Handlers 227
Declaring Tag Variables for Tag Handlers 229
Programming Simple Tag Handlers 231
Including Tag Handlers in Web Applications 231
How Is a Simple Tag Handler Invoked? 232
Tag Handlers for Basic Tags 232
Tag Handlers for Tags with Attributes 232
Tag Handlers for Tags with Bodies 236
Tag Handlers for Tags That Define Variables 237
Cooperating Tags 240
Examples 242

Chapter 8: Scripting in JSP Pages . . . . . . . . . . . . . . . . . . . . . .251


The Example JSP Pages 252
Using Scripting 253
Disabling Scripting 253
Declarations 254
Initializing and Finalizing a JSP Page 254
Scriptlets 255
Expressions 256
Programming Tags That Accept Scripting Elements 257
TLD Elements 257
Tag Handlers 257
CONTENTS ix

Tags with Bodies 260


Cooperating Tags 261
Tags That Define Variables 263

Chapter 9: JavaServer Faces Technology . . . . . . . . . . . . . . . 265


JavaServer Faces Technology Benefits 267
What is a JavaServer Faces Application? 268
A Simple JavaServer Faces Application 268
Steps in the Development Process 269
Mapping the FacesServlet Instance 270
Creating the Pages 271
Defining Page Navigation 278
Configuring Error Messages 279
Developing the Beans 279
Adding Managed Bean Declarations 280
User Interface Component Model 281
User Interface Component Classes 282
Component Rendering Model 284
Conversion Model 289
Event and Listener Model 290
Validation Model 291
Navigation Model 292
Backing Beans 295
The Life Cycle of a JavaServer Faces Page 300
Further Information 306

Chapter 10: Using JavaServer Faces Technology in JSP Pages . .


307
The Example JavaServer Faces Application 308
Setting Up a Page 310
Using the Core Tags 313
Using the HTML Component Tags 316
UI Component Tag Attributes 317
The UIForm Component 319
The UIColumn Component 320
The UICommand Component 321
The UIData Component 323
The UIGraphic Component 326
The UIInput and UIOutput Components 327
x CONTENTS

The UIPanel Component 332


The UISelectBoolean Component 335
The UISelectMany Component 335
The UIMessage and UIMessages Components 337
The UISelectOne Component 338
The UISelectItem, UISelectItems, and UISelectItemGroup Components
339
Using Localized Data 343
Loading a Resource Bundle 343
Referencing Localized Static Data 344
Referencing Error Messages 345
Using the Standard Converters 347
Converting a Component’s Value 348
Using DateTimeConverter 349
Using NumberConverter 351
Registering Listeners on Components 353
Registering a Value-Change Listener on a Component 354
Registering an Action Listener on a Component 355
Using the Standard Validators 356
Requiring a Value 358
Using the LongRangeValidator 359
Binding Component Values and Instances to External Data Sources
359
Binding a Component Value to a Property 361
Binding a Component Value to an Implicit Object 363
Binding a Component Instance to a Bean Property 364
Binding Converters, Listeners, and Validators to Backing Bean Prop-
erties 365
Referencing a Backing Bean Method 367
Referencing a Method That Performs Navigation 368
Referencing a Method That Handles an Action Event 369
Referencing a Method That Performs Validation 370
Referencing a Method That Handles a Value-change Event 370
Using Custom Objects 371
Using a Custom Converter 372
Using a Custom Validator 373
Using a Custom Component 374

Chapter 11: Developing with JavaServer Faces Technology .377


Writing Bean Properties 378
CONTENTS xi

Writing Properties Bound to Component Values 379


Writing Properties Bound to Component Instances 387
Writing Properties Bound to Converters, Listeners, or Validators 389
Performing Localization 390
Creating a Resource Bundle 390
Localizing Dynamic Data 391
Localizing Messages 391
Creating a Custom Converter 393
Implementing an Event Listener 396
Implementing Value-Change Listeners 397
Implementing Action Listeners 398
Creating a Custom Validator 399
Implementing the Validator Interface 400
Creating a Custom Tag 404
Writing Backing Bean Methods 406
Writing a Method to Handle Navigation 407
Writing a Method to Handle an Action Event 409
Writing a Method to Perform Validation 409
Writing a Method to Handle a Value-Change Event 410

Chapter 12: Creating Custom UI Components . . . . . . . . . . . . 413


Determining Whether You Need a Custom Component or Renderer
414
When to Use a Custom Component 414
When to Use a Custom Renderer 415
Component, Renderer, and Tag Combinations 416
Understanding the Image Map Example 417
Why Use JavaServer Faces Technology to Implement an Image Map?
418
Understanding the Rendered HTML 418
Understanding the JSP Page 419
Configuring Model Data 421
Summary of the Application Classes 423
Steps for Creating a Custom Component 424
Creating Custom Component Classes 425
Specifying the Component Family 428
Performing Encoding 428
Performing Decoding 430
Enabling Component Properties to Accept Expressions 431
Saving and Restoring State 433
xii CONTENTS

Delegating Rendering to a Renderer 434


Creating the Renderer Class 435
Identifying the Renderer Type 436
Handling Events for Custom Components 437
Creating the Component Tag Handler 438
Retrieving the Component Type 439
Setting Component Property Values 439
Providing the Renderer Type 442
Releasing Resources 443
Defining the Custom Component Tag in a Tag Library Descriptor 443

Chapter 13: Configuring JavaServer Faces Applications . . . .447


Application Configuration Resource File 448
Configuring Beans 449
Using the managed-bean Element 450
Initializing Properties using the managed-property Element 451
Initializing Maps and Lists 458
Registering Custom Error Messages 459
Registering Custom Localized Static Text 460
Registering a Custom Validator 461
Registering a Custom Converter 462
Configuring Navigation Rules 463
Registering a Custom Renderer with a Render Kit 466
Registering a Custom Component 469
Basic Requirements of a JavaServer Faces Application 470
Configuring an Application with a Deployment Descriptor 471
Including the Required JAR Files 478
Including the Classes, Pages, and Other Resources 478

Chapter 14: Internationalizing and Localizing Web Applications .


481
Java Platform Localization Classes 481
Providing Localized Messages and Labels 482
Establishing the Locale 483
Setting the Resource Bundle 484
Retrieving Localized Messages 485
Date and Number Formatting 486
Character Sets and Encodings 487
Character Sets 487
CONTENTS xiii

Character Encoding 488


Further Information 491

Part Two: Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493

Chapter 15: Building Web Services with JAX-WS . . . . . . . . . . . 495


Setting the Port 496
Creating a Simple Web Service and Client with JAX-WS 496
Requirements of a JAX-WS Endpoint 498
Coding the Service Endpoint Implementation Class 498
Building and Packaging the Service 499
Deploying the Service 499
A Simple JAX-WS Client 501
Types Supported by JAX-WS 503
Web Services Interoperability and JAX-WS 503
Further Information 503

Chapter 16: Binding between XML Schema and Java Classes . .


505
JAXB Architecture 506
Architectural Overview 506
The JAXB Binding Process 507
More About Unmarshalling 508
More About Marshalling 508
More About Validation 508
Representing XML Content 509
Java Representation of XML Schema 509
Binding XML Schemas 509
Simple Type Definitions 509
Default Data Type Bindings 510
Customizing JAXB Bindings 512
Schema-to-Java 512
Java-to-Schema 513
Examples 518
General Usage Instructions 519
Description 520
Using the Examples 523
Configuring and Running the Samples 523
JAXB Compiler Options 523
JAXB Schema Generator Options 525
xiv CONTENTS

About the Schema-to-Java Bindings 526


Schema-Derived JAXB Classes 529
Basic Examples 537
Modify Marshal Example 537
Unmarshal Validate Example 539
Customizing JAXB Bindings 540
Why Customize? 541
Customization Overview 542
Customize Inline Example 555
Datatype Converter Example 560
External Customize Example 561
Java-toSchema Examples 565
j2s-create-marshal Example 565
j2s-xmlAccessorOrder Example 565
j2s-xmlAdapter-field Example 568
j2s-xmlAttribute-field Example 571
j2s-xmlRootElement Example 572
j2s-xmlSchemaType-class Example 572
j2s-xmlType Example 573

Chapter 17: Streaming API for XML . . . . . . . . . . . . . . . . . . . . . .575


Why StAX? 575
Streaming Versus DOM 576
Pull Parsing Versus Push Parsing 577
StAX Use Cases 577
Comparing StAX to Other JAXP APIs 578
StAX API 579
Cursor API 579
Iterator API 580
Choosing Between Cursor and Iterator APIs 585
Using StAX 587
StAX Factory Classes 587
Resources, Namespaces, and Errors 589
Reading XML Streams 590
Writing XML Streams 593
Sun’s Streaming Parser Implementation 595
Reporting CDATA Events 595
SJSXP Factories Implementation 596
Sample Code 597
Sample Code Organization 597
CONTENTS xv

Configuring Your Environment for Running the Samples 598


Running the Samples 599
Sample XML Document 600
cursor Sample – CursorParse.java 600
cursor2event Sample – CursorApproachEventObject.java 603
event Sample – EventParse.java 604
filter Sample – MyStreamFilter.java 606
readnwrite Sample – EventProducerConsumer.java 609
writer Sample – CursorWriter.java 611
Further Information 613

Chapter 18: SOAP with Attachments API for Java . . . . . . . . . . 615


Overview of SAAJ 616
Messages 616
Connections 620
Tutorial 621
Creating and Sending a Simple Message 622
Adding Content to the Header 631
Adding Content to the SOAPPart Object 632
Adding a Document to the SOAP Body 634
Manipulating Message Content Using SAAJ or DOM APIs 634
Adding Attachments 635
Adding Attributes 637
Using SOAP Faults 643
Code Examples 649
Request.java 650
MyUddiPing.java 651
HeaderExample.java 658
DOMExample.java and DOMSrcExample.java 660
Attachments.java 664
SOAPFaultTest.java 666
Further Information 668

Chapter 19: Java API for XML Registries . . . . . . . . . . . . . . . . . . 671


Overview of JAXR 671
What Is a Registry? 671
What Is JAXR? 672
JAXR Architecture 673
Implementing a JAXR Client 674
xvi CONTENTS

Establishing a Connection 675


Querying a Registry 681
Managing Registry Data 686
Using Taxonomies in JAXR Clients 694
Running the Client Examples 699
Before You Compile the Examples 700
Compiling the Examples 701
Running the Examples 702
Using JAXR Clients in Java EE Applications 707
Coding the Application Client: MyAppClient.java 707
Coding the PubQuery Session Bean 708
Editing the Properties File 708
Starting the Application Server 708
Creating JAXR Resources 709
Compiling the Source Files and Packaging the Application 710
Deploying the Application 710
Running the Application Client 710
Further Information 711

Part Three: Enterprise Beans. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .713

Chapter 20: Enterprise Beans . . . . . . . . . . . . . . . . . . . . . . . . . . .715


What Is an Enterprise Bean? 715
Benefits of Enterprise Beans 715
When to Use Enterprise Beans 716
Types of Enterprise Beans 717
What Is a Session Bean? 717
State Management Modes 717
When to Use Session Beans 718
What Is a Message-Driven Bean? 719
What Makes Message-Driven Beans Different from Session and Entity
Beans? 719
When to Use Message-Driven Beans 721
Defining Client Access with Interfaces 721
Remote Clients 722
Local Clients 722
Deciding on Remote or Local Access 723
Web Service Clients 724
Method Parameters and Access 724
The Contents of an Enterprise Bean 725
Naming Conventions for Enterprise Beans 726
CONTENTS xvii

The Life Cycles of Enterprise Beans 727


The Life Cycle of a Stateful Session Bean 727
The Life Cycle of a Stateless Session Bean 728
The Life Cycle of a Message-Driven Bean 729
Further Information 729

Chapter 21: Getting Started with Enterprise Beans . . . . . . . . . 731


Creating the Enterprise Bean 732
Coding the Enterprise Bean 732
Compiling and Packaging converter 733
Creating the Application Client 734
Coding the Application Client 735
Compiling the Application Client 736
Creating the Web Client 737
Coding the Web Client 737
Compiling the Web Client 738
Deploying the Java EE Application 739
Running the Application Client 739
Running the Web Client 739
Modifying the Java EE Application 740
Modifying a Class File 740

Chapter 22: Session Bean Examples . . . . . . . . . . . . . . . . . . . . . 743


The cart Example 743
Session Bean Class 745
The Remove Method 748
Helper Classes 749
Building and Packaging the CartBean Example 749
Undeploying cart 750
A Web Service Example: HelloServiceBean 751
The Web Service Endpoint Implementation Class 751
Stateless Session Bean Implementation Class 752
Building and Packaging helloservice 753
Deploying helloservice 753
Using the Timer Service 754
The Timeout Method 754
Creating Timers 754
Canceling and Saving Timers 755
Getting Timer Information 756
xviii CONTENTS

Transactions and Timers 756


The timersession Example 756
Building and Packaging timersession 757
Deploying timersession 758
Handling Exceptions 759

Chapter 23: A Message-Driven Bean Example . . . . . . . . . . . .761


Example Application Overview 761
The Application Client 762
The Message-Driven Bean Class 763
The onMessage Method 764
Packaging, Deploying, and Running SimpleMessage 765
Creating the Administered Objects 765
Creating and Packaging the Application 766
Deploying the Application 766
Running the Client 767
Removing the Administered Objects 767
Creating Deployment Descriptors for Message-Driven Beans 768

Part Four: Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .769

Chapter 24: Introduction to the Java Persistence API . . . . . . .771


Entities 771
Requirements for Entity Classes 772
Persistent Fields and Properties in Entity Classes 772
Primary Keys in Entities 774
Multiplicity in Entity Relationships 776
Direction in Entity Relationships 777
Managing Entities 779
The Persistence Context 779
The EntityManager 779
Persistence Units 785

Chapter 25: Persistence in the Web Tier . . . . . . . . . . . . . . . . . .787


Accessing Databases from Web Applications 787
Populating the Example Database 789
Creating a Data Source in the Application Server 789
Defining the Persistence Unit 790
Creating an Entity Class 790
CONTENTS xix

Obtaining Access to an Entity Manager 792


Accessing Data From the Database 794
Updating Data in the Database 795

Chapter 26: Persistence in the EJB Tier . . . . . . . . . . . . . . . . . . . 797


Overview of the order Application 797
Entity Relationships in order 798
Primary Keys in order 800
Entity Mapped to More Than One Database Table 804
Cascade Operations in order 805
BLOB and CLOB Database Types in order 805
Temporal Types in order 806
Managing order’s Entities 807
Building and Running order 810
Creating the Database Tables 810
Building and Packaging the Application 810
Deploying the Application 810
Running the Application 811
Undeploying order 812
The roster Application 812
Relationships in the roster Application 813
Automatic Table Generation in roster 814
Building and Running roster 814
Building and Packaging the roster Application 815
Deploying the Application 815
Running the Application 815
Undeploying order 816

Chapter 27: The Java Persistence Query Language . . . . . . . . 817


Terminology 817
Simplified Syntax 818
Select Statements 818
Update and Delete Statements 819
Example Queries 819
Simple Queries 820
Queries That Navigate to Related Entities 821
Queries with Other Conditional Expressions 823
Bulk Updates and Deletes 825
Full Syntax 826
xx CONTENTS

BNF Symbols 826


BNF Grammar of the Java Persistence Query Language 827
FROM Clause 832
Path Expressions 836
WHERE Clause 837
SELECT Clause 848
ORDER BY Clause 851
The GROUP BY Clause 851

Part Five: Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .853

Chapter 28: Introduction to Security in Java EE . . . . . . . . . . . .855


Overview 856
A Simple Example 857
Security Functions 860
Characteristics of Application Security 861
Security Implementation Mechanisms 862
Java SE Security Implementation Mechanisms 862
Java EE Security Implementation Mechanisms 863
Securing Containers 866
Using Deployment Descriptors for Declarative Security 867
Using Annotations 868
Using Programmatic Security 869
Securing the Application Server 869
Working with Realms, Users, Groups, and Roles 871
What is a Realm, User, Group, and Role? 871
Managing Users and Groups on the Application Server 875
Setting Up Security Roles 876
Mapping Roles to Users and Groups 878
Establishing a Secure Connection Using SSL 879
Installing and Configuring SSL Support 880
Specifying a Secure Connection in Your Application Deployment De-
scriptor 880
Verifying SSL Support 881
Working with Digital Certificates 883
Enabling Mutual Authentication over SSL 888
Further Information 891

Chapter 29: Securing Java EE Applications . . . . . . . . . . . . . . .893


Securing Enterprise Beans 894
Discovering Diverse Content Through
Random Scribd Documents
had great need of faith, we who live in the hope of to-morrow and
who know not what to-morrow may bring forth. If I had had a God
in Heaven, whose protecting arm I had felt about me, I should not,
perhaps, have yielded to the vertigo of a wretched passion. I should
always have had consolations, even in the midst of my tears; I
should have employed my excessive love in prayer, instead of not
being able to bestow it upon any one and feeling it stifle me. I had
abandoned myself, because I had faith in myself only and had lost
all my strength. I do not regret having obeyed my reason, having
lived in freedom, having had respect only for the true and the just.
But, nevertheless, when the fever seizes upon me, when I tremble
with weakness, I am filled with fear, I become a child; I would prefer
to be controlled by the Divine will, to efface myself, to allow God to
act in me and for me.
Then, I thought of Marie, asking myself where was her soul at this
hour. In the great realm of nature, without doubt. I indulged in the
dream that each soul is merged in the grand whole, that dead
humanity is but an immense breath, a single spirit. Upon earth we
are separated, we are ignorant of each other, we weep at our
inability to unite ourselves; beyond life there is a complete
penetration, a marriage of all with all, a single and universal love. I
looked at the sky. I seemed to see in the calm and quiet stretch of
blue the soul of the world, the eternal soul made up of all the
others. Then, I experienced a great delight, I had shot ahead of my
cure, I had arrived at pardon and faith. Brothers, my youth still
smiled upon me. I thought that some day we would be reunited all
four—Marie and Jacques, Laurence and myself; we will understand
each other, we will pardon each other; we will love each other
without having to hear the sobs of our bodies, and we will
experience a supreme peace in exchanging those tendernesses
which we could not give each other when we lived in the flesh.
The thought that there is a misunderstanding upon earth, and that
everything is explained in the other world, consoled me. I said to
myself that I would wait for death in order to love. I stood near the
window, in the presence of the sky, in the presence of Marie's
corpse, and, little by little, a gentle coolness, a limitless hope, came
to me from that dead young girl and the dreamy space.
The candles had burned out. The silence in the chamber grew
heavier and heavier, and the darkness increased. Pâquerette still
slept. Jacques had not moved.
Suddenly he arose, he stared around him in terror. I saw him lean
over the corpse and kiss it on the forehead. The cold flesh sent a
shiver through him. Then, he noticed me. He came to me, hesitated,
and then offered me his hand.
I looked at this man whom I could not comprehend, who seemed to
me as obscure as Laurence. I did not know whether he had lied to
me or whether he had wished to save me. This man had struck my
heart a heavy blow. But I had recovered hope, I had pardoned. I
took his hand and pressed it.
Then, he went away, thanking me with a look.
In the morning, I found myself beside Marie's bed, on my knees, still
weeping, but my tears were mild, softened. I wept over this poor girl
whom death had carried off in her spring, ignorant of the kisses of
love.

CHAPTER XXIX

CONCLUSION

Brothers, I am coming to you. I set out to-morrow for the country,


for Provence. I wish to draw a new youth from our broad horizons,
from our pure and glowing sunbeams.
My pride has led me to aim at too lofty a mark. I believed myself
ripe for the struggle, while in reality I was but a weak and
inexperienced child. Perhaps, I shall always remain a child.
I rely upon your friendship, on my remembrances. Near you, I will
recall the days of the past, I will quiet myself, I will succeed in curing
my heart. We will go into the plains, on the shady bank of the river;
we will resume the life we led when we were sixteen, and I will then
forget the terrible year through which I have just passed. I will
return to those days of ignorance and hope, when I knew nothing of
reality and when I dreamed of a better earth. I will become young
again, believing; I will recommence life with new dreams.
Oh! I feel all the thoughts of my youth return to me in a body, filling
me with strength and hope. Everything had disappeared amid the
gloom into which I had entered—you and the world, my daily toil
and my future glory. I lived only for a single idea: to love and to
suffer. To-day, amid my tranquillity, I feel awakening, one by one,
those thoughts which I recognize and to which I extend a hearty
welcome, with a softened soul. I was blind, but now I see clearly
within me; the evil is torn away, I find the world as I left it, broad for
youthful courage, luminous, full of applause. I will resume my labor,
recover my strength, struggle in the name of my faith, in the name
of my tenderness.
Make a place for me beside you, brothers, let us live in the pure air,
in the fields sparkling with sunbeams, in our pure love. Let us
prepare ourselves for life by loving each other, by going hand in
hand in freedom beneath the blue sky. Wait for me, and make
Provence sweeter, more encouraging, to receive me and restore me
my childhood.
Last night, when at the window, in the presence of Marie's corpse, I
purified myself with faith, I saw the sky, full of gloom, whiten at the
horizon. All night long I had had before my eyes the black stretch of
space, pricked by the yellow light of the stars; I had vainly sounded
the infinity of the sombre gulf, growing terrified at the immense
calmness, at the unfathomable depths. This calmness and these
depths were lighted up; the darkness quivered and slowly rolled
back, allowing its mysteries to be seen; the fear inspired by the
gloom gave place to the hope inspired by the growing brightness.
The whole sky grew inflamed, little by little; it acquired rosy tints as
soft as smiles; it bathed in the pale light, sparkling with faint
brilliancy. And, alone in the presence of this tearing away of the
night, of this slow and majestic birth of the day, I felt in my heart a
young, invincible strength, an immense hope.
Brothers, it was the dawn.

THE END
*** END OF THE PROJECT GUTENBERG EBOOK CLAUDE'S
CONFESSION ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like