Jsp tag libraries
Synopsis
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
Commander ce livre au
prix de
62,91
€
59,76
€
Classé sous : Summary, Custom, Tag, Tags, Jsp
Livres en rapport
|
Derniers Blogs
GESTION D'EXCEPTION AVEC LES TASKSGESTION D'EXCEPTION AVEC LES TASKS par richardc
Nous avons vu dans un précédent article comment utiliser Task pour effectuer des opérations dans un autre thread.
Malheureusement, comme tout le monde n'est pas parfait, il se peut que cette exécution se passe mal et qu'une exception se produise.
La...
Cliquez pour lire la suite de l'article par richardc DéMARRONS AVEC LES TASKSDéMARRONS AVEC LES TASKS par richardc
Que vous le vouliez ou non, le développement multi-tâche est maintenant une obligation pour toute nouvelle application. Il est donc vital d'en comprendre les mécanismes et de s'y mettre le plus tôt possible.
En attendant le .NET Framework 4.5 avec le...
Cliquez pour lire la suite de l'article par richardc SLIDE & DéMO TECHDAYS 2012 - FAST & FURIOUS XAML APPSSLIDE & DéMO TECHDAYS 2012 - FAST & FURIOUS XAML APPS par Vko
Retrouvez les slides et les démo de ma session Fast & Furious XAML Apps. A ceux qui se posent la question : "est-ce que le code de la DataGrid est disponible?", je vous répondrais "pas encore". Je vais mettre en place un projet codeplex pour part...
Cliquez pour lire la suite de l'article par Vko XNA IS DEAD!XNA IS DEAD! par richardc
Depuis la semaine dernière (et grâce aux TechDays 2012), je me penche activement sur la nouvelle version de Windows, aka Windows 8. Vous me direz, il était temps puisque la première preview date de Septembre dernier.
OK. Remarquez, on n'en est qu'aux...
Cliquez pour lire la suite de l'article par richardc TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 !TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 ! par ROMELARD Fabrice
Speakers: Fabrice Meillon et Stanislas Quastana Cette session est basée entièrement sur celle donnée lors de la BUILD cet hiver. Il n'y a pas d'ajout d'information en rapport avec cet évènement passé. Windows 8 Server sera intégralem...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|