Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Jsp tag libraries
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Jsp tag libraries

Jsp tag libraries

Gal Shachor, Adam Chace, Magnus Rydin

624 pages, parution le 01/08/2001

Résumé

If you are a JavaServer Pages programmer looking to give your page developers a powerful yet simple syntax for building pages, you will want them to use JSP tags. This book teaches you how to develop custom tag libraries that can separate presentation from implementation, expose functionality in robust and reusable packages, provide easy access to J2EE services, and ultimately avoid the use of scriptlets (with which a page developer can inadvertently cause errors or even shut down your entire system).

JSP Tag Libraries also shows how tag libraries can clarify the flow of events in a page, making it easy to follow what's happening -- and to find out what's not (i.e., to debug). It covers two full-scale use cases showing the effectiveness of tags in the context of ecommerce and of WAP applications.

Because tags help systematize reuse and let non programmers access powerful system features, tag libraries will have a huge impact on the way people develop JSPs.

Table of Contents

  • Preface xvii
  • Acknowledgments xix
  • About this book xxi
  • Author online xxvi
  • About the cover illustration xxvii
  • Part I The Language of Tags 1
  • 1 The big picture 3
  • 1.1 The JSP custom tags solution 4
  • 1.2 HTTP review 5
  • 1.3 Dynamic web servers 9
  • 1.4 Tag-based programming 17
  • 1.5 WAP, voice, and other alternative web clients 19
  • 1.6 Summary 22
  • 2 Web development with Java 23
  • 2.1 Java and dynamic web content 24
  • 2.2 Introduction to Java servlets 25
  • 2.3 Introduction to JavaServer Pages 32
  • 2.4 Access models for business/presentation de-coupling 48
  • 2.5 Servlets, JSP, and application configuration 52
  • 2.6 Summary 57
  • 3 Developing your first tags 58
  • 3.1 What are JSP custom tags? 59
  • 3.2 Why tags? 62
  • 3.3 Setting up a development environment 63
  • 3.4 Hello World example 66
  • 3.5 A tag with a body 76
  • 3.6 Summary 79
  • 4 Custom JSP tag API and life cycle 80
  • 4.1 Requirements of custom tags 81
  • 4.2 Overview of the tag API 83
  • 4.3 The BodyTag interface and its life cycle 94
  • 4.4 Tag API classes 97
  • 4.5 Tag-related features of JSP 1.2 101
  • 4.6 Summary 106
  • 5 Integrating custom tags with the JSP runtime 107
  • 5.1 Tag library descriptor in a nutshell 108
  • 5.2 Referencing a tag library from a JSP 112
  • 5.3 How the JSP runtime works 117
  • 5.4 Summary 126
  • Part II Basic techniques 127
  • 6 Tag development techniques 129
  • 6.1 Reusable tag programming techniques 130
  • 6.2 Writing content back to the user 132
  • 6.3 Setting tag attributes 139
  • 6.4 Logging and Messaging 146
  • 6.5 Using the Servlet API 150
  • 6.6 Configuring tags and bundling resources 169
  • 6.7 Working with the tag's body 176
  • 6.8 Tag cooperation through nesting 188
  • 6.9 Cleaning up 189
  • 6.10 Summary 194
  • 7 Building a tag library for sending email 195
  • 7.1 Sending email from a Java program 196
  • 7.2 Our first email tag 200
  • 7.3 Integrating the tag with the application 206
  • 7.4 Collecting attributes from the tag's body 215
  • 7.5 Adding assertions and input validation 223
  • 7.6 Summary 233
  • 8 Using JavaBeans with Tags 235
  • 8.1 Java reflection 236
  • 8.2 JavaBeans and reflection 244
  • 8.3 The Show tag 251
  • 8.4 Exporting bean values from tags 264
  • 8.5 Summary 275
  • Part III Advanced Techniques 277
  • 9 Posing conditions with tags 279
  • 9.1 Evaluating conditions in JSPs 280
  • 9.2 IfTag--A simple condition tag 281
  • 9.3 The advanced condition tag family 285
  • 9.4 Improving our advanced condition tags 299
  • 9.5 Summary 301
  • 10 Iterating with tags 302
  • 10.1 Iterating with tags 101 305
  • 10.2 Generalized iterating tags 311
  • 10.3 IterateTag 317
  • 10.4 Look, Mom! No scriptlets--IterateTag in action 323
  • 10.5 Making it easier on the JSP author 326
  • 10.6 JSP1.2 and IterationTag 336
  • 10.7 Summary 328
  • 11 Database access with tags 340
  • 11.1 Choosing how to present database information 341
  • 11.2 Designing our database presentation tag library 342
  • 11.3 IterateResultSetTag 345
  • 11.4 Full JDBC connectivity through tags 349
  • 11.5 Database tag library design 352
  • 11.6 Implementing the library 357
  • 11.7 Integrating a controller servlet with our new library 380
  • 11.8 Summary 383
  • 12 Custom tags and J2EE 385
  • 12.1 What is J2EE? 386
  • 12.2 What are EJBs, and why learn of them? 390
  • 12.3 Using and configuring J2EE services 406
  • 12.4 J2EE database connection tags 413
  • 12.5 J2EE email tag 421
  • 12.6 Using EJBs from within JSP 429
  • 12.7 Summary 442
  • Part IV Case studies 443
  • 13 JDBC-driven WebStore 445
  • 13.1 Introduction 446
  • 13.2 Overview 447
  • 13.3 Requirements 448
  • 13.4 Design 452
  • 13.5 Implementation 461
  • 13.6 Summary 526
  • 14 EJB-driven WAPStore 527
  • 14.1 Introduction 528
  • 14.2 Overview 529
  • 14.3 Implementation 530
  • 14.4 Summary 563
  • Part V Design 565
  • 15 JSP tag libraries--tips and tricks 567
  • 15.1 The case for custom tags 568
  • 15.2 Development considerations 571
  • 15.3 Further development and testing 578
  • 15.4 Design recommendations 579
  • 15.5 Additional points to remember 584
  • 15.6 Summary 584
  • A What is XML? 589
  • A.1 XML vs HTML 590
  • A.2 XML syntax 590
  • A.3 XML pitfalls 593
  • A.4 Why XML? 594
  • A.5 Summary 595
  • A.6 Additional reading 595
  • B The Tag Library Descriptor 597
  • B.1 TLD elements 598
  • B.2 A sample TLD 602
  • B.3 JSP1.2 and the new TLD entries 604
  • B.4 Summary 607
  • C Using the code examples 608
  • C.1 Using the example tags 609
  • C.2 Using the case studies 611
  • References 615
  • Index 617

Caractéristiques techniques

  PAPIER
Éditeur(s) Manning Publications
Auteur(s) Gal Shachor, Adam Chace, Magnus Rydin
Parution 01/08/2001
Nb. de pages 624
Format 18,8 x 23,5
Couverture Broché
Poids 1088g
Intérieur Noir et Blanc
EAN13 9781930110090

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav.client@eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription