SlideShare a Scribd company logo
Visit ebookfinal.com to download the full version and
explore more ebooks or textbooks
The Java EE 5 Tutorial 2nd ed Edition Eric
Jendrock
_____ Click the link below to download _____
https://ebookfinal.com/download/the-java-ee-5-tutorial-2nd-
ed-edition-eric-jendrock/
Explore and download more ebooks or textbook at ebookfinal.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
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
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.
iii
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
Contents
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
Chapter III
IMITATION OF PROSE FORMS, CICERONIANISM,
RHETORICS
1. ORATIONS, LETTERS, DIALOGUES
Renaissance classicism is most obvious in adoption of prose
forms. Orations, letters, dialogues, first in Latin, then in the
vernaculars, studiously conform. Orations were none the less a
preoccupation because they had little to do with affairs. Actual
Renaissance conduct of government soon left little room for moving
the people to action by oratory. Legal pleading, as always, had its
special technic. But the oratory of occasion, that third type which
marks anniversaries, extols achievements, and commemorates great
men, was invited widely and cultivated classically. It embraces most
of the published oratory of the Renaissance, and was practiced by
most of the humanists in Latin. Leonardo Bruni of Arezzo (Leonardo
Aretino) is typical both as official orator of Florence and in his early
imaginary orations. Agostino Dati of Siena delivered an encomium of
Eusebius (De laudibus D. Eusebii presbyt. Stridonensis et Ecclesiae
maximi doctoris, in ejus solemniis publice habita, anno 1446). The
funeral of Cardinal Bessarion at Rome had a Latin oration by the
Cardinal Capranica. Jacopo Caviceo cast his congratulatory address
to Maximilian on the victory (1490) over King Ladislaus of Bohemia
in the form called prosopopoeia, that is, of imaginary addresses by
Babylon, Troy, Byzantium, Carthage, and Rome (Urbium dicta ad
Maximilianum Federici Tertii Caesaris filium Romanorum regem
triumphantissimum, Parma, 1491). The Cologne collection,
Orationes clarorum virorum,[13] made such oratory available for
study and imitation.
Of the Italian orations collected by Francesco Sansovino (Venice,
1561, including some translations) as representative of his time, only
one fifth are political, and these only to the extent of being hortatory.
The rest are all occasional: nine funeral orations, a Christmas
address, two before an academy, a call to high aim, a praise of
Italian, four congratulations, and four imaginary addresses
(prosopopoeiae). Claudio Tolomei has two imaginary orations, one
for, the other against.[14] Such oratory, of course, is perennial. Its
Renaissance vogue is distinctive only in being almost exclusive and
in being imitative. Bartolomeo Ricci records[15] that on two occasions
in his office of public orator at Ferrara he imitated specific orations of
Cicero. The habit was general. The desire to sound classical led
even to the lifting of Augustan phrases and cadences. Similar
conditions had led the decadent Greek oratory called sophistic[16]
into archaism as a means of display. Renaissance oratory, even
when it was not led further into the sophistic sacrifice of the message
to the speaker, was thus habitually literary. In Latin especially it was
less often a means of persuasion than an imitative literary form.
What the Latin oration might nevertheless attain was exhibited by
the lectures of Poliziano and again in the range of Marc Antoine
Muret (Muretus, 1525-1585). From a conventional praelectio on the
Aeneid (1579) Muret turned to Tacitus (1580), not only with lively
vigor, but with penetrative suggestion and urgent sentences. When
he returned to official oratory for the feasts of St John Evangelist
(1582) and the Circumcision (1584), he kept the suggestiveness
within the obligatory pattern. True to their kind, models of
conciseness, these have also their own appeal. Occasional oratory
in the Renaissance, then, might be a literary achievement and a
literary progress. More generally it was but one evidence of the
Renaissance preoccupation with rhetoric.
No less inevitable among the published works of the humanists
are their collected Latin letters. Since these had been carefully
composed and revised, they might serve not only history, but
literature. Sometimes in effect essays, sometimes almost orations,
they are sometimes themes. The favorite model is Cicero; and in
extreme cases the letter seems to consist of style. It is hardly a
letter; it is an exercise. But thus to label Renaissance letter-writing
generally would be grossly unfair. Poliziano’s letter to Paolo Cortesi
is admirable as a letter, and comes into literary history on that
ground. For so letters have entered literature in any time. A Latin
letter of John of Salisbury[17] lifts the heart and fills the eyes. Its
cadences are studiously conformed to the cursus of the Curial
dictamen; its diction is expertly chosen to strike always by appeal
and suggestion, never by violence; its hazardous course steers
between Scylla and Charybdis because it is constantly shaped to its
goal. For all this skill is spent singly on making the truth prevail. A
less important, but more famous English letter, Dr Johnson’s to the
Earl of Chesterfield, is no less studious of style, no less expertly
adjusted, even to the phrasing of the obligatory subscription, and no
less single in its aim. Those who make light of such delicacy as mere
style have much to learn both of letters and of literature. Among the
works of Erasmus none is more important than his collected letters.
The Renaissance did well to study Latin letters, and learned much.
But it was mistaken in thinking that a letter reaches posterity except
by reaching its original address and aim. The Latin letters of the
Renaissance often betray a tendency to regard classical style as an
end in itself. Such letters, written to be literary, give the impression
that the Latin letter is a Renaissance literary form.
Perhaps the most popular of ancient prose forms in the
Renaissance was the dialogue; for it was used even oftener in the
vernaculars than in Latin, and became a favorite form of exposition.
The Middle Age, of course, had many dialogues, but not of this sort.
Débat, estrif, conflictus, amoebean eclogue were often allegorical
and generally forms of poetry. Renaissance dialogue is typically
prose discussion. Its vogue was evidently stimulated by the
increasing availability of Plato in both translation and Greek text; but
its method is not often his. The Platonic dialogue typically conveys
the illusion of creative conversation. As Sperone Speroni observes,
[18] it is a sort of prose that takes after poetry. It invites the reader to
join a quest for truth, to feel his way with the speakers, to measure
this objection, respond to that hint; and often it leaves him still
guessing with them, still questing. The other ancient literary type of
dialogue is Cicero’s De oratore. This is less conversation than
debate with definite argument, rebuttal, and progress to a
conclusion.[19] Cicero’s dialogue is not a quest; it is an exposition of
something already determined, and it unfolds that by logical stages.
Renaissance dialogue, having generally his object, turns oftener to
his type; but it does not forget Plato. The more dramatic grouping of
friends in converse appealed widely to Renaissance imagination. It
was imitated in Platonic academies as well as in writing; and its form
of dialogue opened more opportunities for exhibiting one’s literary
acquaintance and bringing forward one’s literary friends. Further
Renaissance dialogues did not often go with Plato. They stopped
with the Platonic setting, or used challenges merely for transition.
Even the most popular of them all, Castiglione’s Cortegiano, though
its personae are unusually distinct, and though it concludes upon
Platonic love, is evidently framed upon the De oratore. Platonic
dialogue must be easy to read; it is by no means easy to write;
witness the failure of many imitations, both Renaissance and
modern. It is a very delicate adjustment of poetic to rhetoric. The
grafting of Plato on Cicero demands long preparation. The usual
Renaissance compromise of letting Plato introduce the speakers and
Cicero rule their discourse was practically sufficient for the better
Renaissance dialogues. The inferior ones have nothing but the
externals of either. Their rejoinders, neither conversation nor debate,
become tedious ceremony;[20] and their composition lacks the
Ciceronian sequence. But even these show how widely the dialogue
form was imitated from antiquity.
2. CICERONIANISM
The pervasive humanistic imitation was not adoption of forms; it
was borrowing of style. The logical extreme of the humanist cult of
Augustan Latin is the exclusive imitation of Cicero as the ideal of
prose style. In 1422 Gherardo Landriani, Bishop of Lodi, drew from a
long-forgotten chest in the cathedral library a complete manuscript of
the principal works of Cicero on rhetoric. The De oratore and the
Orator are the most mature and suggestive treatment of oratory by
the greatest Roman orator. “Summe gaudeo, I have the greatest
delight,” wrote Poggio on receiving the news in London; and Niccolo
de’Niccoli of Florence promised a copy to Aurispa in Constantinople.
So widely was the world of scholarship stirred. For the recovery of
the greater Cicero directly stimulated Renaissance classicism. In the
Middle Age Cicero had been rather a name of honor than a literary
influence. His De inventione, a common source of medieval rhetoric,
is only a youthful compend. What was usually added for further
study, especially of style, the Rhetorica ad Herennium, was ascribed
to him quite erroneously. His greater works on rhetoric were
appreciated doubtless here and there, as by John of Salisbury, but
not generally. Hence the recovery of the De oratore in 1422 was
indeed an event in the history of literature. This and Orator are fine
encomia of the higher function of oratory, and of the orator as leader.
Neither is a manual. Both in Cicero’s intention are contributions to
the philosophy of rhetoric. Without very original or even very specific
doctrine they are eloquently persuasive. What did the Renaissance
do with them?
Most obviously it carried classicism to the extreme of
Ciceronianism, that exclusive imitation which made Cicero the ideal
of Latin prose, the perfect model. The doctrine involves certain
characteristic assumptions: (1) that Latin, or any other language,
attains in a certain historical period its ideal achievement and
capacity, (2) that within such a great period style is constant, (3) that
a language can be recalled from later usage to earlier in scholastic
exercises, (4) that such exercises can suffice for personal
expression, (5) that a single author can suffice as a model, even for
exercises.
Medieval Latin had departed from classical usage because it was
a living language, so widely active in communication as to grow. Men
used it without being disconcerted by changes from place to place,
from time to time. Such changes are inevitable so long as a
language is used generally. Denotations are extended or contracted,
connotations are modified or superseded, even by written use. Oral
use adds changes in cadence. From the seventh century on through
the Middle Age Latin was accentual. The speech tune of Cicero had
faded; and no one had tried to resuscitate what had been supplanted
by other cadences. The Latin hymns had carried medieval measures
to the heights of poetry. Not till the seventeenth century did
humanism succeed in having them revised classically; and fifty
volumes have since been spent in recovering their medieval forms.
[21] The extreme form of Renaissance classicism, by ignoring the
historical development of language, tended to inhibit the use of Latin
in immediate appeal.
So rigid a doctrine did not, of course, enlist all Renaissance
humanists. The more judicious were content to select certain expert
habits, especially Cicero’s strong and supple wielding of sentences.
But the extremists, such as Christophe de Longueil (Longolius,
1488-1522), got fame; the doctrine continued in teaching and in
practice; and as late as 1583 there was point in Sidney’s scornful
allusion to “Nizolian paper books.” His readers knew that he meant
the use of the Cicero thesaurus as a handbook for composition.
Even where it did not enlist devotees, Ciceronianism confirmed the
prevalent idea of the standard diction of the great period. Yet before
the end of the fifteenth century both the general assumption and the
particular cult had been exploded by Poliziano. As university teacher,
in the introductory lecture (praelectio) of his course at Florence on
Quintilian and Statius, he challenged the doctrine of the ideal
classical period by a plea for the pedagogical value of later Latin.
Finally I would not attach undue importance to the objection that the
eloquence of these writers was already corrupted by their period; for if we
regard it aright, we shall perceive that it was not so much corrupted and
debased as changed in kind. Nor should we call it inferior just because it is
different. Certainly it shows greater cultivation of charm: more frequent
pleasantry, many epigrams, many figures, no dull realizations, no inert
structure; all not so much sound as also strong, gay, prompt, full of blood
and color. Therefore, though we may indisputably concede most to those
authors who are greatest, so we may justly contend that some qualities
which are earlier attained and much more attainable [i.e., by students] are
found in these [minor authors]. So, since it is a capital vice to wish to
imitate one author and him alone, we are not off the track if we study
these before those, if we do some things for their practical use.... [So, he
adds, did Cicero himself when he turned from the Attic orators to the
Rhodian and even to the Asiatic.] So that noble painter who was asked
with what master he had made the most progress replied strikingly “With
that one,” pointing to the populace; yes, and rightly too. For since nothing
in human nature is happy in every aspect, many men’s excellences must
be viewed, that one thing may stick from one, another thing from another,
and that each [student] may adapt what suits him (Opera, Gryphius
edition, Lyon, 1537-1539, III, 108-109).
Perhaps nothing else so pointed and telling against Ciceronianism
was written during the Renaissance as Poliziano’s letter to Paolo
Cortesi.
Nor are those who are thought to have held the first rank of eloquence like
one another, as has been remarked by Seneca. Quintilian laughs at those
who shall think themselves cousins of Cicero because they conclude a
period with esse videatur. Horace declaims against imitators who are
nothing but imitators. Certainly they who compose only by imitation seem
to me like parrots or magpies uttering what they do not understand. For
what they write lacks force and life, lacks impulse, lacks emotion, lacks
individuality, lies down, sleeps, snores. Nothing true there, nothing solid,
nothing effective. But are you not, some one asks, expressing Cicero?
What of it? I am not Cicero. I am expressing, I think, myself. Besides,
there are some, my dear Paul, who beg their style, as it were bread,
piecemeal, who live not only from the day, but unto the day. Thus unless
they have at hand the one book to cull from, they cannot join three words
without spoiling them by rude connection or disgraceful barbarism. Their
speech is always tremulous, vacillating, ailing, in a word so ill cared and ill
fed that I cannot bear them, especially when they pass judgment on those
whose styles deep study, manifold reading, and long practice have as it
were fermented. But to come back to you, Paul, of whom I am very fond,
to whom I owe much, whose talent I value very highly, I am asking
whether you so bind yourself by this superstition that nothing pleases you
which is simply yours, and that you never take your eyes from Cicero.
When you have read Cicero—and other good authors—much and long,
worn them down, learned them by heart, concocted, filled your breast with
the knowledge of many things, and are now about to compose something
yourself, then at last I would have you swim, as the saying is, without
corks, take sometimes your own advice, doff that too morose and anxious
solicitude to make yourself merely a Cicero—in a word risk your whole
strength (Opera, Gryphius edition, Lyon, 1537-1539, I, 251).
The writer of that letter, in spite of his youthful triumphs in the
vernacular, gave his mature years to the writing of Latin and the
teaching of Latin and Greek literature. Unfortunately his expert Latin
did not move Renaissance classicism to abandon either the practice
of Ciceronianism or the theory of the ideal great period.
Some forty years after the destructive analysis of Poliziano,
Ciceronianism was still active enough to draw the satire of Erasmus
in the Dialogus Ciceronianus (1528). This reductio ad absurdum,
beginning with the error of using a Cicero thesaurus as a handbook
for composing, proceeds to the affectation of using for the Christian
religion the terms proper to classical paganism: Jupiter Optimus
Maximus for God the Father, Apollo for the Christ. Erasmus amuses
himself by thus rewriting the Apostles’ Creed in Ciceronian terms.
His point is not merely the pedantry of such paganism, nor its
irreverence, but its unreality. Only the words can be taken over; the
meaning or the suggestion, in one direction or the other, is violated.
The point had been made more forcibly, because more practically, by
Poliziano. Preoccupation with past usage thwarts the expression of
actual present things and thoughts. Further Erasmus makes his
Ciceronian admit that the cult is illusory, a dream which according to
its own adepts has never quite come true. Incidentally the names
thus brought up in the dialogue are not only of those Ciceronians
who had at least a transient fame, but also of some whom history
does not even know.
In spite of this destructive satire, Giulio Camillo reaffirmed
Ciceronianism with undisturbed simplicity.
Latin is no longer spoken, as our vernacular is, or French; it has been shut
up in books. Since we are limited to gathering it not from actual speech,
but from books, why not rather from the perfect than from the inferior? Let
us first recall the language to the state in which we may believe it to have
been while Vergil wrote it, or Cicero, and then confidently use that, even
as Vergil did, or Cicero? (Trattato della imitatione, 1544.)
In 1545 Bartolomeo Ricci, tutor to Hercole d’Este’s son Lorenzo,
closed his treatise De imitatione with a Ciceronian credo and a long
defense of Longolius. Ciceronianism, then, survived both rebuttal
and satire. As late as 1580 Muret, having renounced his own early
Ciceronianism, attacked its major premise, the doctrine of the ideal
great period. His argument is not, as Poliziano’s a hundred years
before, pedagogical; it is a direct challenge to Renaissance
competence in judging Latin style. His previous praelectio had urged
the distinctive claims of Tacitus: practical philosophy, finished
economy of style. This second lecture on Tacitus deals with
objections. The preference for Suetonius he merely dismisses. But
Tacitus is accused of inaccuracy. By whom? By Vopiscus; and who is
Vopiscus? Tacitus is hostile to the Christian religion. Shall we rule
out all the pagans? The rest of the lecture deals with style.
There remain two objections brought against Tacitus by the inexpert:
that his style is obscure and rough, and that he does not write good Latin.
When I hear complaints of the obscurity of Tacitus, I reflect how easily
people transfer their own faults to others. [I remember the anecdote of the
man who complained that the windows were too small, when the real
trouble was his own failing sight. So a deaf man was heard to complain
that people did not speak distinctly.]
But Tacitus, says another, is rough. Alciati, praising his friend Jovius,
has not feared to call the histories of Tacitus thorny. Well, praising Jovius
shows as much judgment as blaming Tacitus. No two could be more
different. Tacitus could not but displease a man who made so much of
Jovius.... For Jovius is all smooth; he has not a trace of that roughness
which offends Alciati in Tacitus. He not only flows; he overflows.... As
Alciati is afraid of roughness, I am sick of silliness. Sirup for babes; but let
me have a bowl of something with a tang.
Finally, those who grant to Tacitus his other qualities still deplore his bad
Latin. The first movers of this calumny, each of whom had spent much
pains in expounding Tacitus, were Alciati and Ferret. If they themselves
wrote Latin as well as they think, perhaps we might be disturbed by their
authority. Do you make bold, some one may say, to judge such men?
They have made bold to judge Tacitus.... [If we can know Latin (as Camillo
says) only from books (and, we may add, from comparatively few books),
we have the less warrant for judging Latin usage.]... Who dare affirm for
certain today, when “the old authors” are so extolled, that the questioned
phrases of Tacitus were never used by these “old authors?” (Leipzig ed. of
1660, vol. II, pp. 108-112.)
Even now, perhaps, though the name of the heresy has long been
forgotten, the Ciceronian perversion of imitation is not extinct. But if
this kind of imitation is not valid, what kinds are valid? Imitation of
style may be suggestive when it remains subconscious, not the
recalling of words, but the adaptation of remembered rhythms. The
deliberate conformity proposed by Ciceronianism can be useful only
as exercise, as the learning of certain effects by trying them. Once
learned, these become an added resource in revision. In composing,
in the creative process of bringing one’s message to one’s audience,
deliberate imitation of style has no warrant. It would at least interrupt,
and might deviate or inhibit. In so far as Ciceronianism confuses two
processes normally separate, composing and revising, it tends to
make style stilted.
Further, Ciceronianism narrows imitation by a theory of
perfectionism. The Imitatio Christi (about 1460) is the direct appeal
of an author preoccupied with his message. Sébastien Châteillon
(1515-1563) rewrote its spontaneous Latin in Ciceronian cadences.
It was imperfect; he would make it perfect. If this was pedantic, even
absurd, wherein? If the Pilgrim’s Progress should not be rewritten in
the style of Hooker or of Sir Thomas Browne, why? Because the one
ideal style is an illusion.
Finally, imitation need not be of style; it may be of composition;
and for writing addressed to an actual public this is at once more
available and more promising. For real writing, that is for a message
intended to move the public, imitation generally risks less, and gains
more, in guiding the plan, the whole scheme, the sequence.
Renaissance preoccupation with style and tolerance of published
themes tended to obscure the larger opportunity.
But there is no Ciceronianism in Castiglione’s adopting the form of
Cicero’s De oratore for his Cortegiano. Though he naturally shows
awareness of Cicero’s expert periods, he is bent not on conformity of
style, but on focusing the typical man of his own time in the literary
frame used by Cicero for the typical Augustan Roman. Renaissance
imitation of Vergil’s style was often futile; but Tasso’s Jerusalem was
animated and guided by Vergil’s epic sequence. Robert Garnier,
imitating the style of Euripides, missed the dramatic composition; but
Corneille caught the whole scheme of a Greek tragedy. Such larger
imitation imposes no restraint on originality. Its recognition of ancient
achievement is in practical adaptation to one’s own conception and
object and time. In this direction the classicism of the seventeenth
century became more fruitful than that of the sixteenth.
3. RHETORICS
Manuals and treatises on rhetoric published in the fifteenth and
sixteenth centuries exhibit marked differences in tradition, scope,
and tendency. They range from narrow concentration on style to a
full treatment of the five parts of rhetoric. They exhibit sophistic as
well as rhetoric. Some persist in medieval preconception as others
recover the classical heritage of Aristotle and Quintilian. The works
mentioned below are typical of the many Renaissance manuals.
The Rhetorica (1437?) of George of Trebizond shows in brief the
whole classical scope:[22] inventio, the exploration of the subject and
the determination of its status; dispositio, plan and order; elocutio,
style; memoria, the art of holding a point for effective placing; and
pronuntiatio, delivery. He is most expansive on the first, which had
been both neglected and misapplied by the Middle Age.[23]
The presentation of rhetoric by Juan Luis Vives (De ratione
dicendi, Bruges, 1532; reprinted in Vol. II of the Majansius edition of
his works) is both meager and vaguely general.
Vives urges that rhetoric is not a study for boys, and that it should not be
confined to diction. But he himself offers hardly anything specific about
composition. Book I deals mainly with sentences (compositio), e.g., with
dilation and conciseness as in the Copia of Erasmus, and with the period.
Book II offers brief generalizations on type or tone of style, on the
conventionalized measure of native ability against study and revision, on
consideration of emotions and moral habits, on the threefold task of
instructing, winning, and moving, and on appropriateness. Book III deals
with narration (history, exempla, fables, poetry), paraphrase, epitome,
commentary. History as composition is hardly even considered.
His incidental discussion of rhetoric in De causis corruptarum
artium and De tradendis disciplinis (Vol. VI of the collective edition) is
no more satisfying. In Book IV of the former Vives so far
misconceives the classical inventio as to rule it out of rhetoric
altogether. Thus he practically ratifies the procedure of those
Renaissance logicians who classified inventio and dispositio under
logic. The classification was not a reform; it merely recorded tardily
the medieval practice of reducing rhetoric to style by relying for all
the active work of composition on debate. Yet Vives pays repeated
homage to both Aristotle and Quintilian.
On the other hand the concise manual of Joannes Caesarius
(Rhetorica, Paris, 1542) returns to the full classical scope. The
source cited most explicitly and quoted most frequently is Quintilian.
But that later ancient tradition called sophistic, which had deviated
the rhetoric of the Middle Age, had also its Renaissance revival.
Giulio Camillo (1479-1550), known in France as well as in Italy,
published together a treatise on the orator’s material, the oratorical
fund, and another on imitation (Due trattati ... l’uno delle materie che
possono venir sotto lo stile dell’eloquente, l’altro della imitatione,
Venice, 1544-1545). His constant preoccupation is with the topics,
headings, commonplaces (loci) which guide the writer’s preparation.
Such are the headings of the sophistic recipe for encomium: birth
and family, native city, deeds, etc. But sophistic had elaborated such
obvious suggestions for exploring one’s material into a system
applicable both to material and to style. Camillo’s source is:
the Ideas of Hermogenes, who in each considers eight things: the sense,
the method, the words, the verbal figures, the clauses, their combination,
sentence-control (fermezza), and rhythm. But my method is perhaps
easier, since I proceed not from the forms (forme) to the materials, but
from the materials to the forms.... I have sought how many things can
combine to produce the forms, and I find (as I have argued in my Latin
orations) not eight things, as Hermogenes writes, but fourteen which may
enter to modify any material. They are these: conceptions, or inventions
(Trovati), passions, commonplaces, ways of speaking (le vie del dire),
arguments, order, words, verbal figures, clauses, connectives, sentence
forms, cadence (gli estremi), rhythms, harmonies.
This bewildering cross-division might serve as the reductio ad
absurdum of the system of bringing on eloquence by topics if Camillo
had not gone even further in a grandiose symbolistic scheme entitled
L’idea del theatro (Florence, 1550). The theater here is not any
actual stage; it is the manifold pageant of the world presented
allegorically by topics for all literary purposes.
Starting from the medieval, or perhaps the neo-Platonic, premise that
sacred things are not revealed, but figured, he divides his book into seven
gradi. Seven is the perfect number; e.g., seven planets, Isaiah’s seven
columns, Vergil’s terque quaterque, etc. Each grado is named after a
planet, whose attributes are a mixture of astrology and mythology, as in
the Middle Age, but again with a suggestion of orientalized Platonism. This
general scheme constitutes the first section. The second is entitled Il
convivio; the third, l’Antro; etc. A figure may appear in more than one
grado.
Referring to this book in his treatise on imitation, he says: “By topics
and images I have arranged all the headings that may suffice to
group and to subserve all human conceptions.” In the same treatise
he even thinks of painting and sculpture as proceeding by topics:
genus, sex, age, function, anatomy, light and shadow, attitude and
action, adaptation to place. Topics can no farther go. Camillo’s
system, moreover, hardly touches composition; all its manifold
application is to style. Thus the more readily he accepts the common
Renaissance confusion of poetic with rhetoric.
Another Ciceronian treatise on imitation is Bartolomeo Ricci’s
(Bartholomaei Riccii de imitatione libri tres ad Alfonsum Atestium
Principem, suum in literis alumnum, Herculis II Ferrariensium
Principis filium ... Venice, 1545). Written ostensibly for the guidance
of his pupil Alfonso, it is a discussion, not a textbook; but in the back
of the author’s mind is the prevalent conception of writing Latin as
writing themes. The examples quote prose and poetry side by side
without distinction of poetic from rhetoric. The usual complimentary
references to contemporaries and to recognized previous humanists
give the schoolmaster opportunity to exhibit his wide acquaintance.
Poliziano is cited as challenging imitation; but his arguments are not
given, nor the fact that his challenge was of Ciceronianism. Instead
of citing his letter to Cortesi, Ricci merely praises Cortesi’s reply as
elegant. The Ciceronianus of Erasmus is similarly dismissed as an
attack on Longueil. The progress of the book is generally from
definition of imitation (I) through application of it in composition (II) to
application in style (III). Ciceronianism, implied throughout, first in
classicism, then by increasing use of Cicero as a model, is explicitly
declared in III and supported by a long defense of Longueil.
I. Imitation, practiced in all human activities, is accepted in literature.
Though Catullus in the marriage of Thetis and in the desolation of Ariadne
said the last word and every word, nevertheless Vergil imitated him in
Dido; and each has his own merits. [The Catullus passages are stock
citations of the period.] Cicero and Vergil both counseled and practiced
imitation. Why reduce following nature to following yourself? Following
nature demands no more than being natural, i.e., verisimilitude. [The
quibble here between nature in the sense of human nature and nature in
the sense of one’s own nature (ingenium) is unpardonable. Further, it is
not clear what either has to do with imitation.] Imitate the best authors,
each in his own kind. There follows a summary of Latin literature. [The
book supplies no distinct definition of imitation as a means of advancing
literary control. It shows, quite superfluously, that imitation is prevalent in
the arts; it does not define the limits and the methods of practicing it in
writing.]
II. A review of the revival of Augustan diction in a long list of humanists
proves nothing specific concerning imitation, much concerning pride in
humanistic Latin. Scholars, however, are not well paid. Doctors and
lawyers write bad Latin. Teachers are incompetent. The vernacular has
come even into the schools; and even Cicero is translated. Let us all
combine to save Latin style. Imitation is not repetition, not copy; there
must be variation. Imitation with Plautus and Terence was the taking of
Greek plots [a very inexact account]. Vergil imitated Homer even to the
lifting of passages, and made a better tempest. Cicero imitated the Greek
orators. Vergil used the Pharmaceutria of Theocritus. [He did not imitate
it.] Vergil’s use of Cato and Varro adds beauty of style. [Is this imitation, or
simply use of material?] Sallust’s Catiline is admirable; but it did not
preclude Cicero’s. So, even after Lucretius, Ovid and Vergil treated the
gods. [Here is mere confusion. Cicero did not imitate Sallust; he wrote on
the same subject.] The exposure of Andromeda is told by Manilius, Ovid,
and Pontanus; and the last did it best. Comparison of Vergil’s Dido with
the Ariadne of Catullus is followed by another comparatio without
enlightening us as to the nature or the method of imitation. Rehearsal of
literary forms (history, exposition, pleading) leads to the assertion that
Cicero is the best model in all three styles.
III. Let us take Cicero, then, for our model. Proverbs, epigrams,
definitions may be lifted as familiar enough to be common property. How
to make variations on the model is exemplified abundantly in sentence
form and in diction by both prose and verse. The book closes with many
analyzed examples from Longueil, to rebut the charge that his writing is
mere cento, or pastiche, and to exhibit him as the perfect Ciceronian. Ricci
appends a practical hint from his own experience. His habit is to start boys
with Terence because the plots are interesting, then to add some Cicero,
and finally to give them Cicero alone.
The demonstration of Longueil’s eloquence is rather an epilogue
than a conclusion. It does not suffice to justify Ciceronianism, much
less to explain imitation. The character of imitation, its limits, its
profitable methods, are left still vague.
Of the same year is Bernardino Tomitano’s Discussions of Tuscan
(Ragionamenti della lingua toscana ... Venice, 1545). The sub-title
goes on: “wherein the talk is of the perfect vernacular orator and
poet ... divided into three books. In the first, philosophy is proved
necessary to the acquisition of rhetoric and poetic; in the second are
set forth the precepts of the orator; and in the third, the laws
pertaining to the poet and to good writing in both prose and verse.”
A dialogue in form, with an academy setting, this is largely a
monologue by Speroni with interruptions, and is devoted mainly to
“the perfect orator and poet.” The book is a stilted and diffuse digest
of conventional rhetoric jumbled with poetic, with examples under
each conventional heading. Petrarch is made the exemplar of
everything, even of argumentation. The idea of poetic as a distinct
mode of composition never even enters.
I. Sperone Speroni, the protagonist, is made to repeat his contention
that language study is not the gateway to philosophy and his epigram:
“things make men wise; words make them seem so.” Tomitano apparently
takes him to mean that philosophy feeds style, not style philosophy; for
Tomitano goes on to exhibit Petrarch as full of philosophy and perfect in
style. Dante is less careful, but Petrarch is a treasury for all writers.
II. The anxiety to exhibit Petrarch leads to strange rendering of the
conventional divisions of rhetoric. Inventio, “first of those five strings on
which the orator makes smoothest harmony,” is “imagining things that
have truth, or at least verisimilitude,” and is forthwith confused with
dispositio (compartimento). Petrarch exemplifies not only exordium and
narratio, but even proof and rebuttal. Of the “three styles” of oratory the
highest is Boccaccio’s in Fiammetta, the median in the Decameron. But
since among verse forms the highest are canzone, sestina, and madriale;
the plainest, ballata, stanza, and capitolo; the sonnet, Petrarch’s favorite
form, must be median. Under style the doctrine of “tone-color” is easily
reduced to unintentional absurdity.
III. The distinction of poet from orator is discovered at great length to be
—verse. The Ferrarese are best in comedies, the Venetians in sonnets,
the Marchigiani in capitoli, they of Vicenza in ballate, the Romans in odes
and hymns, the Paduans in tragedies, the Florentines in blank verse.
Inventio in poetry is the rehearsal of myths, of which the poet is lord and
guardian. An interruption! How can you put Petrarch above Dante when
you began by urging that the poet should be a philosopher? Answer (240):
Petrarch had all the philosophy he needed, and used it more poetically.
Though Dante was the greater philosopher, Petrarch was the better poet.
When Aristotle calls Sophocles more perfect than Euripides, he does not
mean in style [!]. In poetry dispositio is evenness, consistency, harmony;
and narratio has the same rules as in oratory. Horace’s precepts, to begin
in mediis, to combine instruction with charm, to seek advice, and to revise,
are all repeated. On a request for more about style follows a discussion of
words, simple and compound, proper and figurative, new and old. Finally
the company joins in citing many examples.
Having run out of headings, Tomitano thus runs down. He had not in
the least profited by the revival of Cicero and Quintilian.
Renaissance Platonism, disputing Aristotle’s philosophy, attacked
also his rhetoric. Francesco Patrizzi (1529-1597) published in his
youth a collection of ten vernacular dialogues on rhetoric (Della
retorica, dieci dialoghi, Venice, 1552), “in which,” the sub-title adds,
“the talk is of the art of oratory, with reasons impugning the opinion
held of it by ancient writers.” The Platonic dialogue, followed
superficially, is quite beyond Patrizzi’s achievement. Discussing
oratory (I) at large, he goes on to its materials (II, III, IV), its
ornaments (V), its divisions (VI), the quality of the orator (VII), the art
of oratory (VIII), the perfect rhetoric (IX), and rhetorical amplification
(X). Evidently neither a logical division nor a sequence, these
categories are rather successive openings for attack. Patrizzi
appears not only as a Platonist, but as an anti-Aristotelian. His main
quarrels are with the scope of Aristotle’s Rhetoric, with the doctrine
of imitation, and with making rhetoric an art.
As to scope and materials Aristotle is inconsistent. He says both that the
orator has no material and that he has all materials (25). Why, then, did he
spend most of his Rhetoric on teaching the materials, slighting the ends,
the ideas, the forms, the instruments, and omitting status? [The
misinterpretation amounts to gross misstatement.] Perhaps we lack any
clear definition of the orator because professors insist on including under a
single word all sorts of discourse (27). Even the oratorical ornaments are
not peculiar to the orator. His materials are the same as the economist’s,
the historian’s, the poet’s (37). Having given oratory so much scope, how
can Aristotle restrict it to three kinds? (60). [Evidently superficial, this is
rather quarrel and quibble than refutation.]
As to imitation, Patrizzi holds that a painter represents not his
conception (concetto), but the objects themselves [a heresy that
reappeared as lately as Ruskin’s “pathetic fallacy”]. Taking no pains to
understand what the Aristotelian imitation means, and ignoring the
obvious fact that it is applied to poetic, he thus dismisses it by denial.
Similarly he finds that rhetoric is not an art because Plato says it is
merely a skill (peritia).
The significance of this work is that in 1552 a Venetian seeking
recognition at twenty-two could use some distinguished names in
dialogues smartly rapping Aristotle, and even find a publisher.
The English rhetoric of Thomas Wilson (The art of rhetorique, for
the use of all such as are studious of eloquence, set forth in English,
London, 1553 [reprinted down to 1593; ed. G. H. Mair, Oxford,
1909]) covers the ancient scheme practically, using Cicero and
Quintilian as well as the Rhetorica ad Herennium, and deriving much
from Erasmus.
The Partitiones oratoriae (Venice and Paris, 1558) of Jacopo
Brocardo is exactly described by its sub-title as elegans et dilucida
paraphrasis of Aristotle’s Rhetoric. Now translating, now
paraphrasing, it provides in its marginal headings a sufficient table of
contents.
But the revival of the full classical tradition is most obvious in the
comprehensive Italian rhetoric of Bartolomeo Cavalcanti (La retorica,
1555; second edition, Venice, 1558/9, reprinted Pesaro, 1574).
Through 563 closely printed pages this is strictly and consistently a
rhetoric of the classical character and scope. The exceptional
avoidance of confusion with poetic appears in the bare mention of
Vergil and in the ousting of Petrarch from his monopoly as exemplar
of everything desirable in prose as well as in verse. Plato is rare;
Plutarch, rarer. The main body of analyzed examples is from the
orations of Cicero. Demosthenes is only less frequent. From Livy
and Thucydides the examples are usually of the imaginary
harangues to troops. All the examples that are not themselves Italian
are translated. Hermogenes is cited some half-dozen times;
Quintilian, twice as often; but the main source of doctrine is the
Rhetoric of Aristotle and, next to that, his Logic. The book is
constantly and consistently Aristotelian.
Instead of devoting himself after the Renaissance habit mainly to style,
Cavalcanti gives it only one of his seven books (V). All the rest are spent
on composition. Book I is a lucid survey of the field; II shows the ways of
inventio in each of the three types of oratory; III deals with argument; IV,
with appeal to emotion and to moral habit; V, besides the usual lists of
figures, has an unusually definite treatment of sentence management
(compositio) and a meager summary of dispositio; VI presents the typical
parts of an oration, avoiding the common confusion of narratio (statement
of the facts) with narrative; VII deals with confirmation and conclusion. Its
incidental recurrence to dispositio is again vague. Cavalcanti had excuse
enough in the ancient tradition, which is generally weakest in its counsels
for sequence.
Fortunately Cavalcanti’s own plan is clear and fairly progressive; and
his adjustment to his own time appears in the prominence given to
the third of the ancient types of oratory, such speeches on occasion
as were the main Renaissance field. His defect is the common
Renaissance vice of diffuseness. Beyond its intrinsic value
Cavalcanti’s Retorica has historical significance. It gave the wider
audience a just and distinct view of classical rhetoric.
The sixteenth century closed with the full classical doctrine
operative in the Ratio studiorum and in the Rhetoric of Soarez.
Chapter IV
IMITATION IN LYRIC AND PASTORAL
1. LYRIC
The lyrics of the fifteenth and sixteenth centuries show an
extensive revival of Augustan measures in Latin. Meantime imitation
of Petrarch made him an Italian classic and a European model.
Thus, in England, revival from a meager and languid fifteenth
century was stimulated in the sixteenth by Italy. But France shows
the history of vernacular lyric in clearest stages: (1) in the formalizing
of medieval modes by the rhétoriqueurs; (2) in the verse forms and
diction of Lemaire and Marot, seeking variety without rejecting
tradition; (3) in the Pléiade program of revolt from tradition to
classicism, and especially in Ronsard’s experiments with the Greek
ode; (4) in the final predominance of the sonnet.
(a) Latin Lyric
Latin lyric was both changed in mode by the Renaissance and
increased in volume. The fifteenth century turned from the modes of
the medieval Latin lyric to more direct imitation of Vergil and Ovid,
Catullus and Horace. Meantime the tradition of writing Latin verse in
school continued to make every Renaissance author familiar with
this metric. The difference was that he now used it in his own mature
composition. For humanism demanded even of vernacular poets
such Latin stanzas as might introduce the works of their friends,
compliment their patrons, or celebrate state weddings, victories, and
solemn entries. Though even published Latin lyrics were often
themes, they at least promoted and confirmed two pervasive
Renaissance literary habits: control of classical metric, and imitation.
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

More Related Content

Similar to The Java EE 5 Tutorial 2nd ed Edition Eric Jendrock (20)

PDF
Firstcup
RahimK123
 
PDF
Sun UltraTM 45 and Ultra 25 Workstations Service and Diagnostics Manual
hindirahuerfano
 
PDF
E49322 07
tompark21
 
PDF
Oracle database 12c client installation guide 6
bupbechanhgmail
 
PDF
Oracle database 12c 2 day + application express developer's guide
bupbechanhgmail
 
PDF
Oracle database 12c client installation overview
bupbechanhgmail
 
PDF
Oracle database 12c client installation guide 3
bupbechanhgmail
 
PDF
Guia implementacion seguridad oracle 12c
Otto Paiz
 
PDF
Demantra12
ggangad09
 
PDF
120posig
vinodchun
 
PDF
Workbench en
Meenakshi Chandrasekaran
 
PDF
using-advanced-controls (1).pdf
Hussein Abdelrahman
 
PDF
Oracle database 12c application express end user's guide
bupbechanhgmail
 
PDF
Starting Out With Java From Control Structures Through Objects 7th Edition To...
dinisofujiy
 
PDF
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Ivan Hui
 
ODP
Java code coverage with JCov. Implementation details and use cases.
Alexandre (Shura) Iline
 
PDF
Odi 12c-getstart-vm-install-guide-2401840
Udaykumar Sarana
 
PDF
E29632
ssfdsdsf
 
PDF
Ora db 2 day+ app express dev guide
Darnette A
 
PDF
Javaee tutorial
Luis Miguel
 
Firstcup
RahimK123
 
Sun UltraTM 45 and Ultra 25 Workstations Service and Diagnostics Manual
hindirahuerfano
 
E49322 07
tompark21
 
Oracle database 12c client installation guide 6
bupbechanhgmail
 
Oracle database 12c 2 day + application express developer's guide
bupbechanhgmail
 
Oracle database 12c client installation overview
bupbechanhgmail
 
Oracle database 12c client installation guide 3
bupbechanhgmail
 
Guia implementacion seguridad oracle 12c
Otto Paiz
 
Demantra12
ggangad09
 
120posig
vinodchun
 
using-advanced-controls (1).pdf
Hussein Abdelrahman
 
Oracle database 12c application express end user's guide
bupbechanhgmail
 
Starting Out With Java From Control Structures Through Objects 7th Edition To...
dinisofujiy
 
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Ivan Hui
 
Java code coverage with JCov. Implementation details and use cases.
Alexandre (Shura) Iline
 
Odi 12c-getstart-vm-install-guide-2401840
Udaykumar Sarana
 
E29632
ssfdsdsf
 
Ora db 2 day+ app express dev guide
Darnette A
 
Javaee tutorial
Luis Miguel
 

Recently uploaded (20)

PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
PPTX
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPT on the Development of Education in the Victorian England
Beena E S
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Ad

The Java EE 5 Tutorial 2nd ed Edition Eric Jendrock

  • 1. Visit ebookfinal.com to download the full version and explore more ebooks or textbooks The Java EE 5 Tutorial 2nd ed Edition Eric Jendrock _____ Click the link below to download _____ https://ebookfinal.com/download/the-java-ee-5-tutorial-2nd- ed-edition-eric-jendrock/ Explore and download more ebooks or textbook at ebookfinal.com
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. 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/
  • 3. 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/
  • 5. 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
  • 6. 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
  • 7. 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.
  • 8. iii 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 Contents
  • 9. 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
  • 10. 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
  • 11. 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
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. 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
  • 19. 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
  • 20. 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
  • 21. 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
  • 22. 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
  • 23. 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
  • 24. 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
  • 25. 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
  • 26. Discovering Diverse Content Through Random Scribd Documents
  • 27. Chapter III IMITATION OF PROSE FORMS, CICERONIANISM, RHETORICS 1. ORATIONS, LETTERS, DIALOGUES Renaissance classicism is most obvious in adoption of prose forms. Orations, letters, dialogues, first in Latin, then in the vernaculars, studiously conform. Orations were none the less a preoccupation because they had little to do with affairs. Actual Renaissance conduct of government soon left little room for moving the people to action by oratory. Legal pleading, as always, had its special technic. But the oratory of occasion, that third type which marks anniversaries, extols achievements, and commemorates great men, was invited widely and cultivated classically. It embraces most of the published oratory of the Renaissance, and was practiced by most of the humanists in Latin. Leonardo Bruni of Arezzo (Leonardo Aretino) is typical both as official orator of Florence and in his early imaginary orations. Agostino Dati of Siena delivered an encomium of Eusebius (De laudibus D. Eusebii presbyt. Stridonensis et Ecclesiae maximi doctoris, in ejus solemniis publice habita, anno 1446). The funeral of Cardinal Bessarion at Rome had a Latin oration by the Cardinal Capranica. Jacopo Caviceo cast his congratulatory address to Maximilian on the victory (1490) over King Ladislaus of Bohemia in the form called prosopopoeia, that is, of imaginary addresses by Babylon, Troy, Byzantium, Carthage, and Rome (Urbium dicta ad Maximilianum Federici Tertii Caesaris filium Romanorum regem triumphantissimum, Parma, 1491). The Cologne collection, Orationes clarorum virorum,[13] made such oratory available for study and imitation.
  • 28. Of the Italian orations collected by Francesco Sansovino (Venice, 1561, including some translations) as representative of his time, only one fifth are political, and these only to the extent of being hortatory. The rest are all occasional: nine funeral orations, a Christmas address, two before an academy, a call to high aim, a praise of Italian, four congratulations, and four imaginary addresses (prosopopoeiae). Claudio Tolomei has two imaginary orations, one for, the other against.[14] Such oratory, of course, is perennial. Its Renaissance vogue is distinctive only in being almost exclusive and in being imitative. Bartolomeo Ricci records[15] that on two occasions in his office of public orator at Ferrara he imitated specific orations of Cicero. The habit was general. The desire to sound classical led even to the lifting of Augustan phrases and cadences. Similar conditions had led the decadent Greek oratory called sophistic[16] into archaism as a means of display. Renaissance oratory, even when it was not led further into the sophistic sacrifice of the message to the speaker, was thus habitually literary. In Latin especially it was less often a means of persuasion than an imitative literary form. What the Latin oration might nevertheless attain was exhibited by the lectures of Poliziano and again in the range of Marc Antoine Muret (Muretus, 1525-1585). From a conventional praelectio on the Aeneid (1579) Muret turned to Tacitus (1580), not only with lively vigor, but with penetrative suggestion and urgent sentences. When he returned to official oratory for the feasts of St John Evangelist (1582) and the Circumcision (1584), he kept the suggestiveness within the obligatory pattern. True to their kind, models of conciseness, these have also their own appeal. Occasional oratory in the Renaissance, then, might be a literary achievement and a literary progress. More generally it was but one evidence of the Renaissance preoccupation with rhetoric. No less inevitable among the published works of the humanists are their collected Latin letters. Since these had been carefully composed and revised, they might serve not only history, but literature. Sometimes in effect essays, sometimes almost orations, they are sometimes themes. The favorite model is Cicero; and in extreme cases the letter seems to consist of style. It is hardly a
  • 29. letter; it is an exercise. But thus to label Renaissance letter-writing generally would be grossly unfair. Poliziano’s letter to Paolo Cortesi is admirable as a letter, and comes into literary history on that ground. For so letters have entered literature in any time. A Latin letter of John of Salisbury[17] lifts the heart and fills the eyes. Its cadences are studiously conformed to the cursus of the Curial dictamen; its diction is expertly chosen to strike always by appeal and suggestion, never by violence; its hazardous course steers between Scylla and Charybdis because it is constantly shaped to its goal. For all this skill is spent singly on making the truth prevail. A less important, but more famous English letter, Dr Johnson’s to the Earl of Chesterfield, is no less studious of style, no less expertly adjusted, even to the phrasing of the obligatory subscription, and no less single in its aim. Those who make light of such delicacy as mere style have much to learn both of letters and of literature. Among the works of Erasmus none is more important than his collected letters. The Renaissance did well to study Latin letters, and learned much. But it was mistaken in thinking that a letter reaches posterity except by reaching its original address and aim. The Latin letters of the Renaissance often betray a tendency to regard classical style as an end in itself. Such letters, written to be literary, give the impression that the Latin letter is a Renaissance literary form. Perhaps the most popular of ancient prose forms in the Renaissance was the dialogue; for it was used even oftener in the vernaculars than in Latin, and became a favorite form of exposition. The Middle Age, of course, had many dialogues, but not of this sort. Débat, estrif, conflictus, amoebean eclogue were often allegorical and generally forms of poetry. Renaissance dialogue is typically prose discussion. Its vogue was evidently stimulated by the increasing availability of Plato in both translation and Greek text; but its method is not often his. The Platonic dialogue typically conveys the illusion of creative conversation. As Sperone Speroni observes, [18] it is a sort of prose that takes after poetry. It invites the reader to join a quest for truth, to feel his way with the speakers, to measure this objection, respond to that hint; and often it leaves him still guessing with them, still questing. The other ancient literary type of
  • 30. dialogue is Cicero’s De oratore. This is less conversation than debate with definite argument, rebuttal, and progress to a conclusion.[19] Cicero’s dialogue is not a quest; it is an exposition of something already determined, and it unfolds that by logical stages. Renaissance dialogue, having generally his object, turns oftener to his type; but it does not forget Plato. The more dramatic grouping of friends in converse appealed widely to Renaissance imagination. It was imitated in Platonic academies as well as in writing; and its form of dialogue opened more opportunities for exhibiting one’s literary acquaintance and bringing forward one’s literary friends. Further Renaissance dialogues did not often go with Plato. They stopped with the Platonic setting, or used challenges merely for transition. Even the most popular of them all, Castiglione’s Cortegiano, though its personae are unusually distinct, and though it concludes upon Platonic love, is evidently framed upon the De oratore. Platonic dialogue must be easy to read; it is by no means easy to write; witness the failure of many imitations, both Renaissance and modern. It is a very delicate adjustment of poetic to rhetoric. The grafting of Plato on Cicero demands long preparation. The usual Renaissance compromise of letting Plato introduce the speakers and Cicero rule their discourse was practically sufficient for the better Renaissance dialogues. The inferior ones have nothing but the externals of either. Their rejoinders, neither conversation nor debate, become tedious ceremony;[20] and their composition lacks the Ciceronian sequence. But even these show how widely the dialogue form was imitated from antiquity. 2. CICERONIANISM The pervasive humanistic imitation was not adoption of forms; it was borrowing of style. The logical extreme of the humanist cult of Augustan Latin is the exclusive imitation of Cicero as the ideal of prose style. In 1422 Gherardo Landriani, Bishop of Lodi, drew from a long-forgotten chest in the cathedral library a complete manuscript of the principal works of Cicero on rhetoric. The De oratore and the Orator are the most mature and suggestive treatment of oratory by
  • 31. the greatest Roman orator. “Summe gaudeo, I have the greatest delight,” wrote Poggio on receiving the news in London; and Niccolo de’Niccoli of Florence promised a copy to Aurispa in Constantinople. So widely was the world of scholarship stirred. For the recovery of the greater Cicero directly stimulated Renaissance classicism. In the Middle Age Cicero had been rather a name of honor than a literary influence. His De inventione, a common source of medieval rhetoric, is only a youthful compend. What was usually added for further study, especially of style, the Rhetorica ad Herennium, was ascribed to him quite erroneously. His greater works on rhetoric were appreciated doubtless here and there, as by John of Salisbury, but not generally. Hence the recovery of the De oratore in 1422 was indeed an event in the history of literature. This and Orator are fine encomia of the higher function of oratory, and of the orator as leader. Neither is a manual. Both in Cicero’s intention are contributions to the philosophy of rhetoric. Without very original or even very specific doctrine they are eloquently persuasive. What did the Renaissance do with them? Most obviously it carried classicism to the extreme of Ciceronianism, that exclusive imitation which made Cicero the ideal of Latin prose, the perfect model. The doctrine involves certain characteristic assumptions: (1) that Latin, or any other language, attains in a certain historical period its ideal achievement and capacity, (2) that within such a great period style is constant, (3) that a language can be recalled from later usage to earlier in scholastic exercises, (4) that such exercises can suffice for personal expression, (5) that a single author can suffice as a model, even for exercises. Medieval Latin had departed from classical usage because it was a living language, so widely active in communication as to grow. Men used it without being disconcerted by changes from place to place, from time to time. Such changes are inevitable so long as a language is used generally. Denotations are extended or contracted, connotations are modified or superseded, even by written use. Oral use adds changes in cadence. From the seventh century on through the Middle Age Latin was accentual. The speech tune of Cicero had
  • 32. faded; and no one had tried to resuscitate what had been supplanted by other cadences. The Latin hymns had carried medieval measures to the heights of poetry. Not till the seventeenth century did humanism succeed in having them revised classically; and fifty volumes have since been spent in recovering their medieval forms. [21] The extreme form of Renaissance classicism, by ignoring the historical development of language, tended to inhibit the use of Latin in immediate appeal. So rigid a doctrine did not, of course, enlist all Renaissance humanists. The more judicious were content to select certain expert habits, especially Cicero’s strong and supple wielding of sentences. But the extremists, such as Christophe de Longueil (Longolius, 1488-1522), got fame; the doctrine continued in teaching and in practice; and as late as 1583 there was point in Sidney’s scornful allusion to “Nizolian paper books.” His readers knew that he meant the use of the Cicero thesaurus as a handbook for composition. Even where it did not enlist devotees, Ciceronianism confirmed the prevalent idea of the standard diction of the great period. Yet before the end of the fifteenth century both the general assumption and the particular cult had been exploded by Poliziano. As university teacher, in the introductory lecture (praelectio) of his course at Florence on Quintilian and Statius, he challenged the doctrine of the ideal classical period by a plea for the pedagogical value of later Latin. Finally I would not attach undue importance to the objection that the eloquence of these writers was already corrupted by their period; for if we regard it aright, we shall perceive that it was not so much corrupted and debased as changed in kind. Nor should we call it inferior just because it is different. Certainly it shows greater cultivation of charm: more frequent pleasantry, many epigrams, many figures, no dull realizations, no inert structure; all not so much sound as also strong, gay, prompt, full of blood and color. Therefore, though we may indisputably concede most to those authors who are greatest, so we may justly contend that some qualities which are earlier attained and much more attainable [i.e., by students] are found in these [minor authors]. So, since it is a capital vice to wish to imitate one author and him alone, we are not off the track if we study these before those, if we do some things for their practical use.... [So, he adds, did Cicero himself when he turned from the Attic orators to the
  • 33. Rhodian and even to the Asiatic.] So that noble painter who was asked with what master he had made the most progress replied strikingly “With that one,” pointing to the populace; yes, and rightly too. For since nothing in human nature is happy in every aspect, many men’s excellences must be viewed, that one thing may stick from one, another thing from another, and that each [student] may adapt what suits him (Opera, Gryphius edition, Lyon, 1537-1539, III, 108-109). Perhaps nothing else so pointed and telling against Ciceronianism was written during the Renaissance as Poliziano’s letter to Paolo Cortesi. Nor are those who are thought to have held the first rank of eloquence like one another, as has been remarked by Seneca. Quintilian laughs at those who shall think themselves cousins of Cicero because they conclude a period with esse videatur. Horace declaims against imitators who are nothing but imitators. Certainly they who compose only by imitation seem to me like parrots or magpies uttering what they do not understand. For what they write lacks force and life, lacks impulse, lacks emotion, lacks individuality, lies down, sleeps, snores. Nothing true there, nothing solid, nothing effective. But are you not, some one asks, expressing Cicero? What of it? I am not Cicero. I am expressing, I think, myself. Besides, there are some, my dear Paul, who beg their style, as it were bread, piecemeal, who live not only from the day, but unto the day. Thus unless they have at hand the one book to cull from, they cannot join three words without spoiling them by rude connection or disgraceful barbarism. Their speech is always tremulous, vacillating, ailing, in a word so ill cared and ill fed that I cannot bear them, especially when they pass judgment on those whose styles deep study, manifold reading, and long practice have as it were fermented. But to come back to you, Paul, of whom I am very fond, to whom I owe much, whose talent I value very highly, I am asking whether you so bind yourself by this superstition that nothing pleases you which is simply yours, and that you never take your eyes from Cicero. When you have read Cicero—and other good authors—much and long, worn them down, learned them by heart, concocted, filled your breast with the knowledge of many things, and are now about to compose something yourself, then at last I would have you swim, as the saying is, without corks, take sometimes your own advice, doff that too morose and anxious solicitude to make yourself merely a Cicero—in a word risk your whole strength (Opera, Gryphius edition, Lyon, 1537-1539, I, 251).
  • 34. The writer of that letter, in spite of his youthful triumphs in the vernacular, gave his mature years to the writing of Latin and the teaching of Latin and Greek literature. Unfortunately his expert Latin did not move Renaissance classicism to abandon either the practice of Ciceronianism or the theory of the ideal great period. Some forty years after the destructive analysis of Poliziano, Ciceronianism was still active enough to draw the satire of Erasmus in the Dialogus Ciceronianus (1528). This reductio ad absurdum, beginning with the error of using a Cicero thesaurus as a handbook for composing, proceeds to the affectation of using for the Christian religion the terms proper to classical paganism: Jupiter Optimus Maximus for God the Father, Apollo for the Christ. Erasmus amuses himself by thus rewriting the Apostles’ Creed in Ciceronian terms. His point is not merely the pedantry of such paganism, nor its irreverence, but its unreality. Only the words can be taken over; the meaning or the suggestion, in one direction or the other, is violated. The point had been made more forcibly, because more practically, by Poliziano. Preoccupation with past usage thwarts the expression of actual present things and thoughts. Further Erasmus makes his Ciceronian admit that the cult is illusory, a dream which according to its own adepts has never quite come true. Incidentally the names thus brought up in the dialogue are not only of those Ciceronians who had at least a transient fame, but also of some whom history does not even know. In spite of this destructive satire, Giulio Camillo reaffirmed Ciceronianism with undisturbed simplicity. Latin is no longer spoken, as our vernacular is, or French; it has been shut up in books. Since we are limited to gathering it not from actual speech, but from books, why not rather from the perfect than from the inferior? Let us first recall the language to the state in which we may believe it to have been while Vergil wrote it, or Cicero, and then confidently use that, even as Vergil did, or Cicero? (Trattato della imitatione, 1544.) In 1545 Bartolomeo Ricci, tutor to Hercole d’Este’s son Lorenzo, closed his treatise De imitatione with a Ciceronian credo and a long defense of Longolius. Ciceronianism, then, survived both rebuttal
  • 35. and satire. As late as 1580 Muret, having renounced his own early Ciceronianism, attacked its major premise, the doctrine of the ideal great period. His argument is not, as Poliziano’s a hundred years before, pedagogical; it is a direct challenge to Renaissance competence in judging Latin style. His previous praelectio had urged the distinctive claims of Tacitus: practical philosophy, finished economy of style. This second lecture on Tacitus deals with objections. The preference for Suetonius he merely dismisses. But Tacitus is accused of inaccuracy. By whom? By Vopiscus; and who is Vopiscus? Tacitus is hostile to the Christian religion. Shall we rule out all the pagans? The rest of the lecture deals with style. There remain two objections brought against Tacitus by the inexpert: that his style is obscure and rough, and that he does not write good Latin. When I hear complaints of the obscurity of Tacitus, I reflect how easily people transfer their own faults to others. [I remember the anecdote of the man who complained that the windows were too small, when the real trouble was his own failing sight. So a deaf man was heard to complain that people did not speak distinctly.] But Tacitus, says another, is rough. Alciati, praising his friend Jovius, has not feared to call the histories of Tacitus thorny. Well, praising Jovius shows as much judgment as blaming Tacitus. No two could be more different. Tacitus could not but displease a man who made so much of Jovius.... For Jovius is all smooth; he has not a trace of that roughness which offends Alciati in Tacitus. He not only flows; he overflows.... As Alciati is afraid of roughness, I am sick of silliness. Sirup for babes; but let me have a bowl of something with a tang. Finally, those who grant to Tacitus his other qualities still deplore his bad Latin. The first movers of this calumny, each of whom had spent much pains in expounding Tacitus, were Alciati and Ferret. If they themselves wrote Latin as well as they think, perhaps we might be disturbed by their authority. Do you make bold, some one may say, to judge such men? They have made bold to judge Tacitus.... [If we can know Latin (as Camillo says) only from books (and, we may add, from comparatively few books), we have the less warrant for judging Latin usage.]... Who dare affirm for certain today, when “the old authors” are so extolled, that the questioned phrases of Tacitus were never used by these “old authors?” (Leipzig ed. of 1660, vol. II, pp. 108-112.)
  • 36. Even now, perhaps, though the name of the heresy has long been forgotten, the Ciceronian perversion of imitation is not extinct. But if this kind of imitation is not valid, what kinds are valid? Imitation of style may be suggestive when it remains subconscious, not the recalling of words, but the adaptation of remembered rhythms. The deliberate conformity proposed by Ciceronianism can be useful only as exercise, as the learning of certain effects by trying them. Once learned, these become an added resource in revision. In composing, in the creative process of bringing one’s message to one’s audience, deliberate imitation of style has no warrant. It would at least interrupt, and might deviate or inhibit. In so far as Ciceronianism confuses two processes normally separate, composing and revising, it tends to make style stilted. Further, Ciceronianism narrows imitation by a theory of perfectionism. The Imitatio Christi (about 1460) is the direct appeal of an author preoccupied with his message. Sébastien Châteillon (1515-1563) rewrote its spontaneous Latin in Ciceronian cadences. It was imperfect; he would make it perfect. If this was pedantic, even absurd, wherein? If the Pilgrim’s Progress should not be rewritten in the style of Hooker or of Sir Thomas Browne, why? Because the one ideal style is an illusion. Finally, imitation need not be of style; it may be of composition; and for writing addressed to an actual public this is at once more available and more promising. For real writing, that is for a message intended to move the public, imitation generally risks less, and gains more, in guiding the plan, the whole scheme, the sequence. Renaissance preoccupation with style and tolerance of published themes tended to obscure the larger opportunity. But there is no Ciceronianism in Castiglione’s adopting the form of Cicero’s De oratore for his Cortegiano. Though he naturally shows awareness of Cicero’s expert periods, he is bent not on conformity of style, but on focusing the typical man of his own time in the literary frame used by Cicero for the typical Augustan Roman. Renaissance imitation of Vergil’s style was often futile; but Tasso’s Jerusalem was animated and guided by Vergil’s epic sequence. Robert Garnier, imitating the style of Euripides, missed the dramatic composition; but
  • 37. Corneille caught the whole scheme of a Greek tragedy. Such larger imitation imposes no restraint on originality. Its recognition of ancient achievement is in practical adaptation to one’s own conception and object and time. In this direction the classicism of the seventeenth century became more fruitful than that of the sixteenth. 3. RHETORICS Manuals and treatises on rhetoric published in the fifteenth and sixteenth centuries exhibit marked differences in tradition, scope, and tendency. They range from narrow concentration on style to a full treatment of the five parts of rhetoric. They exhibit sophistic as well as rhetoric. Some persist in medieval preconception as others recover the classical heritage of Aristotle and Quintilian. The works mentioned below are typical of the many Renaissance manuals. The Rhetorica (1437?) of George of Trebizond shows in brief the whole classical scope:[22] inventio, the exploration of the subject and the determination of its status; dispositio, plan and order; elocutio, style; memoria, the art of holding a point for effective placing; and pronuntiatio, delivery. He is most expansive on the first, which had been both neglected and misapplied by the Middle Age.[23] The presentation of rhetoric by Juan Luis Vives (De ratione dicendi, Bruges, 1532; reprinted in Vol. II of the Majansius edition of his works) is both meager and vaguely general. Vives urges that rhetoric is not a study for boys, and that it should not be confined to diction. But he himself offers hardly anything specific about composition. Book I deals mainly with sentences (compositio), e.g., with dilation and conciseness as in the Copia of Erasmus, and with the period. Book II offers brief generalizations on type or tone of style, on the conventionalized measure of native ability against study and revision, on consideration of emotions and moral habits, on the threefold task of instructing, winning, and moving, and on appropriateness. Book III deals with narration (history, exempla, fables, poetry), paraphrase, epitome, commentary. History as composition is hardly even considered.
  • 38. His incidental discussion of rhetoric in De causis corruptarum artium and De tradendis disciplinis (Vol. VI of the collective edition) is no more satisfying. In Book IV of the former Vives so far misconceives the classical inventio as to rule it out of rhetoric altogether. Thus he practically ratifies the procedure of those Renaissance logicians who classified inventio and dispositio under logic. The classification was not a reform; it merely recorded tardily the medieval practice of reducing rhetoric to style by relying for all the active work of composition on debate. Yet Vives pays repeated homage to both Aristotle and Quintilian. On the other hand the concise manual of Joannes Caesarius (Rhetorica, Paris, 1542) returns to the full classical scope. The source cited most explicitly and quoted most frequently is Quintilian. But that later ancient tradition called sophistic, which had deviated the rhetoric of the Middle Age, had also its Renaissance revival. Giulio Camillo (1479-1550), known in France as well as in Italy, published together a treatise on the orator’s material, the oratorical fund, and another on imitation (Due trattati ... l’uno delle materie che possono venir sotto lo stile dell’eloquente, l’altro della imitatione, Venice, 1544-1545). His constant preoccupation is with the topics, headings, commonplaces (loci) which guide the writer’s preparation. Such are the headings of the sophistic recipe for encomium: birth and family, native city, deeds, etc. But sophistic had elaborated such obvious suggestions for exploring one’s material into a system applicable both to material and to style. Camillo’s source is: the Ideas of Hermogenes, who in each considers eight things: the sense, the method, the words, the verbal figures, the clauses, their combination, sentence-control (fermezza), and rhythm. But my method is perhaps easier, since I proceed not from the forms (forme) to the materials, but from the materials to the forms.... I have sought how many things can combine to produce the forms, and I find (as I have argued in my Latin orations) not eight things, as Hermogenes writes, but fourteen which may enter to modify any material. They are these: conceptions, or inventions (Trovati), passions, commonplaces, ways of speaking (le vie del dire), arguments, order, words, verbal figures, clauses, connectives, sentence forms, cadence (gli estremi), rhythms, harmonies.
  • 39. This bewildering cross-division might serve as the reductio ad absurdum of the system of bringing on eloquence by topics if Camillo had not gone even further in a grandiose symbolistic scheme entitled L’idea del theatro (Florence, 1550). The theater here is not any actual stage; it is the manifold pageant of the world presented allegorically by topics for all literary purposes. Starting from the medieval, or perhaps the neo-Platonic, premise that sacred things are not revealed, but figured, he divides his book into seven gradi. Seven is the perfect number; e.g., seven planets, Isaiah’s seven columns, Vergil’s terque quaterque, etc. Each grado is named after a planet, whose attributes are a mixture of astrology and mythology, as in the Middle Age, but again with a suggestion of orientalized Platonism. This general scheme constitutes the first section. The second is entitled Il convivio; the third, l’Antro; etc. A figure may appear in more than one grado. Referring to this book in his treatise on imitation, he says: “By topics and images I have arranged all the headings that may suffice to group and to subserve all human conceptions.” In the same treatise he even thinks of painting and sculpture as proceeding by topics: genus, sex, age, function, anatomy, light and shadow, attitude and action, adaptation to place. Topics can no farther go. Camillo’s system, moreover, hardly touches composition; all its manifold application is to style. Thus the more readily he accepts the common Renaissance confusion of poetic with rhetoric. Another Ciceronian treatise on imitation is Bartolomeo Ricci’s (Bartholomaei Riccii de imitatione libri tres ad Alfonsum Atestium Principem, suum in literis alumnum, Herculis II Ferrariensium Principis filium ... Venice, 1545). Written ostensibly for the guidance of his pupil Alfonso, it is a discussion, not a textbook; but in the back of the author’s mind is the prevalent conception of writing Latin as writing themes. The examples quote prose and poetry side by side without distinction of poetic from rhetoric. The usual complimentary references to contemporaries and to recognized previous humanists give the schoolmaster opportunity to exhibit his wide acquaintance. Poliziano is cited as challenging imitation; but his arguments are not given, nor the fact that his challenge was of Ciceronianism. Instead
  • 40. of citing his letter to Cortesi, Ricci merely praises Cortesi’s reply as elegant. The Ciceronianus of Erasmus is similarly dismissed as an attack on Longueil. The progress of the book is generally from definition of imitation (I) through application of it in composition (II) to application in style (III). Ciceronianism, implied throughout, first in classicism, then by increasing use of Cicero as a model, is explicitly declared in III and supported by a long defense of Longueil. I. Imitation, practiced in all human activities, is accepted in literature. Though Catullus in the marriage of Thetis and in the desolation of Ariadne said the last word and every word, nevertheless Vergil imitated him in Dido; and each has his own merits. [The Catullus passages are stock citations of the period.] Cicero and Vergil both counseled and practiced imitation. Why reduce following nature to following yourself? Following nature demands no more than being natural, i.e., verisimilitude. [The quibble here between nature in the sense of human nature and nature in the sense of one’s own nature (ingenium) is unpardonable. Further, it is not clear what either has to do with imitation.] Imitate the best authors, each in his own kind. There follows a summary of Latin literature. [The book supplies no distinct definition of imitation as a means of advancing literary control. It shows, quite superfluously, that imitation is prevalent in the arts; it does not define the limits and the methods of practicing it in writing.] II. A review of the revival of Augustan diction in a long list of humanists proves nothing specific concerning imitation, much concerning pride in humanistic Latin. Scholars, however, are not well paid. Doctors and lawyers write bad Latin. Teachers are incompetent. The vernacular has come even into the schools; and even Cicero is translated. Let us all combine to save Latin style. Imitation is not repetition, not copy; there must be variation. Imitation with Plautus and Terence was the taking of Greek plots [a very inexact account]. Vergil imitated Homer even to the lifting of passages, and made a better tempest. Cicero imitated the Greek orators. Vergil used the Pharmaceutria of Theocritus. [He did not imitate it.] Vergil’s use of Cato and Varro adds beauty of style. [Is this imitation, or simply use of material?] Sallust’s Catiline is admirable; but it did not preclude Cicero’s. So, even after Lucretius, Ovid and Vergil treated the gods. [Here is mere confusion. Cicero did not imitate Sallust; he wrote on the same subject.] The exposure of Andromeda is told by Manilius, Ovid, and Pontanus; and the last did it best. Comparison of Vergil’s Dido with the Ariadne of Catullus is followed by another comparatio without enlightening us as to the nature or the method of imitation. Rehearsal of
  • 41. literary forms (history, exposition, pleading) leads to the assertion that Cicero is the best model in all three styles. III. Let us take Cicero, then, for our model. Proverbs, epigrams, definitions may be lifted as familiar enough to be common property. How to make variations on the model is exemplified abundantly in sentence form and in diction by both prose and verse. The book closes with many analyzed examples from Longueil, to rebut the charge that his writing is mere cento, or pastiche, and to exhibit him as the perfect Ciceronian. Ricci appends a practical hint from his own experience. His habit is to start boys with Terence because the plots are interesting, then to add some Cicero, and finally to give them Cicero alone. The demonstration of Longueil’s eloquence is rather an epilogue than a conclusion. It does not suffice to justify Ciceronianism, much less to explain imitation. The character of imitation, its limits, its profitable methods, are left still vague. Of the same year is Bernardino Tomitano’s Discussions of Tuscan (Ragionamenti della lingua toscana ... Venice, 1545). The sub-title goes on: “wherein the talk is of the perfect vernacular orator and poet ... divided into three books. In the first, philosophy is proved necessary to the acquisition of rhetoric and poetic; in the second are set forth the precepts of the orator; and in the third, the laws pertaining to the poet and to good writing in both prose and verse.” A dialogue in form, with an academy setting, this is largely a monologue by Speroni with interruptions, and is devoted mainly to “the perfect orator and poet.” The book is a stilted and diffuse digest of conventional rhetoric jumbled with poetic, with examples under each conventional heading. Petrarch is made the exemplar of everything, even of argumentation. The idea of poetic as a distinct mode of composition never even enters. I. Sperone Speroni, the protagonist, is made to repeat his contention that language study is not the gateway to philosophy and his epigram: “things make men wise; words make them seem so.” Tomitano apparently takes him to mean that philosophy feeds style, not style philosophy; for Tomitano goes on to exhibit Petrarch as full of philosophy and perfect in style. Dante is less careful, but Petrarch is a treasury for all writers.
  • 42. II. The anxiety to exhibit Petrarch leads to strange rendering of the conventional divisions of rhetoric. Inventio, “first of those five strings on which the orator makes smoothest harmony,” is “imagining things that have truth, or at least verisimilitude,” and is forthwith confused with dispositio (compartimento). Petrarch exemplifies not only exordium and narratio, but even proof and rebuttal. Of the “three styles” of oratory the highest is Boccaccio’s in Fiammetta, the median in the Decameron. But since among verse forms the highest are canzone, sestina, and madriale; the plainest, ballata, stanza, and capitolo; the sonnet, Petrarch’s favorite form, must be median. Under style the doctrine of “tone-color” is easily reduced to unintentional absurdity. III. The distinction of poet from orator is discovered at great length to be —verse. The Ferrarese are best in comedies, the Venetians in sonnets, the Marchigiani in capitoli, they of Vicenza in ballate, the Romans in odes and hymns, the Paduans in tragedies, the Florentines in blank verse. Inventio in poetry is the rehearsal of myths, of which the poet is lord and guardian. An interruption! How can you put Petrarch above Dante when you began by urging that the poet should be a philosopher? Answer (240): Petrarch had all the philosophy he needed, and used it more poetically. Though Dante was the greater philosopher, Petrarch was the better poet. When Aristotle calls Sophocles more perfect than Euripides, he does not mean in style [!]. In poetry dispositio is evenness, consistency, harmony; and narratio has the same rules as in oratory. Horace’s precepts, to begin in mediis, to combine instruction with charm, to seek advice, and to revise, are all repeated. On a request for more about style follows a discussion of words, simple and compound, proper and figurative, new and old. Finally the company joins in citing many examples. Having run out of headings, Tomitano thus runs down. He had not in the least profited by the revival of Cicero and Quintilian. Renaissance Platonism, disputing Aristotle’s philosophy, attacked also his rhetoric. Francesco Patrizzi (1529-1597) published in his youth a collection of ten vernacular dialogues on rhetoric (Della retorica, dieci dialoghi, Venice, 1552), “in which,” the sub-title adds, “the talk is of the art of oratory, with reasons impugning the opinion held of it by ancient writers.” The Platonic dialogue, followed superficially, is quite beyond Patrizzi’s achievement. Discussing oratory (I) at large, he goes on to its materials (II, III, IV), its ornaments (V), its divisions (VI), the quality of the orator (VII), the art of oratory (VIII), the perfect rhetoric (IX), and rhetorical amplification
  • 43. (X). Evidently neither a logical division nor a sequence, these categories are rather successive openings for attack. Patrizzi appears not only as a Platonist, but as an anti-Aristotelian. His main quarrels are with the scope of Aristotle’s Rhetoric, with the doctrine of imitation, and with making rhetoric an art. As to scope and materials Aristotle is inconsistent. He says both that the orator has no material and that he has all materials (25). Why, then, did he spend most of his Rhetoric on teaching the materials, slighting the ends, the ideas, the forms, the instruments, and omitting status? [The misinterpretation amounts to gross misstatement.] Perhaps we lack any clear definition of the orator because professors insist on including under a single word all sorts of discourse (27). Even the oratorical ornaments are not peculiar to the orator. His materials are the same as the economist’s, the historian’s, the poet’s (37). Having given oratory so much scope, how can Aristotle restrict it to three kinds? (60). [Evidently superficial, this is rather quarrel and quibble than refutation.] As to imitation, Patrizzi holds that a painter represents not his conception (concetto), but the objects themselves [a heresy that reappeared as lately as Ruskin’s “pathetic fallacy”]. Taking no pains to understand what the Aristotelian imitation means, and ignoring the obvious fact that it is applied to poetic, he thus dismisses it by denial. Similarly he finds that rhetoric is not an art because Plato says it is merely a skill (peritia). The significance of this work is that in 1552 a Venetian seeking recognition at twenty-two could use some distinguished names in dialogues smartly rapping Aristotle, and even find a publisher. The English rhetoric of Thomas Wilson (The art of rhetorique, for the use of all such as are studious of eloquence, set forth in English, London, 1553 [reprinted down to 1593; ed. G. H. Mair, Oxford, 1909]) covers the ancient scheme practically, using Cicero and Quintilian as well as the Rhetorica ad Herennium, and deriving much from Erasmus. The Partitiones oratoriae (Venice and Paris, 1558) of Jacopo Brocardo is exactly described by its sub-title as elegans et dilucida paraphrasis of Aristotle’s Rhetoric. Now translating, now
  • 44. paraphrasing, it provides in its marginal headings a sufficient table of contents. But the revival of the full classical tradition is most obvious in the comprehensive Italian rhetoric of Bartolomeo Cavalcanti (La retorica, 1555; second edition, Venice, 1558/9, reprinted Pesaro, 1574). Through 563 closely printed pages this is strictly and consistently a rhetoric of the classical character and scope. The exceptional avoidance of confusion with poetic appears in the bare mention of Vergil and in the ousting of Petrarch from his monopoly as exemplar of everything desirable in prose as well as in verse. Plato is rare; Plutarch, rarer. The main body of analyzed examples is from the orations of Cicero. Demosthenes is only less frequent. From Livy and Thucydides the examples are usually of the imaginary harangues to troops. All the examples that are not themselves Italian are translated. Hermogenes is cited some half-dozen times; Quintilian, twice as often; but the main source of doctrine is the Rhetoric of Aristotle and, next to that, his Logic. The book is constantly and consistently Aristotelian. Instead of devoting himself after the Renaissance habit mainly to style, Cavalcanti gives it only one of his seven books (V). All the rest are spent on composition. Book I is a lucid survey of the field; II shows the ways of inventio in each of the three types of oratory; III deals with argument; IV, with appeal to emotion and to moral habit; V, besides the usual lists of figures, has an unusually definite treatment of sentence management (compositio) and a meager summary of dispositio; VI presents the typical parts of an oration, avoiding the common confusion of narratio (statement of the facts) with narrative; VII deals with confirmation and conclusion. Its incidental recurrence to dispositio is again vague. Cavalcanti had excuse enough in the ancient tradition, which is generally weakest in its counsels for sequence. Fortunately Cavalcanti’s own plan is clear and fairly progressive; and his adjustment to his own time appears in the prominence given to the third of the ancient types of oratory, such speeches on occasion as were the main Renaissance field. His defect is the common Renaissance vice of diffuseness. Beyond its intrinsic value
  • 45. Cavalcanti’s Retorica has historical significance. It gave the wider audience a just and distinct view of classical rhetoric. The sixteenth century closed with the full classical doctrine operative in the Ratio studiorum and in the Rhetoric of Soarez.
  • 46. Chapter IV IMITATION IN LYRIC AND PASTORAL 1. LYRIC The lyrics of the fifteenth and sixteenth centuries show an extensive revival of Augustan measures in Latin. Meantime imitation of Petrarch made him an Italian classic and a European model. Thus, in England, revival from a meager and languid fifteenth century was stimulated in the sixteenth by Italy. But France shows the history of vernacular lyric in clearest stages: (1) in the formalizing of medieval modes by the rhétoriqueurs; (2) in the verse forms and diction of Lemaire and Marot, seeking variety without rejecting tradition; (3) in the Pléiade program of revolt from tradition to classicism, and especially in Ronsard’s experiments with the Greek ode; (4) in the final predominance of the sonnet. (a) Latin Lyric Latin lyric was both changed in mode by the Renaissance and increased in volume. The fifteenth century turned from the modes of the medieval Latin lyric to more direct imitation of Vergil and Ovid, Catullus and Horace. Meantime the tradition of writing Latin verse in school continued to make every Renaissance author familiar with this metric. The difference was that he now used it in his own mature composition. For humanism demanded even of vernacular poets such Latin stanzas as might introduce the works of their friends, compliment their patrons, or celebrate state weddings, victories, and solemn entries. Though even published Latin lyrics were often themes, they at least promoted and confirmed two pervasive Renaissance literary habits: control of classical metric, and imitation.
  • 47. 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