| Preface |
|
xiii | |
| Acknowledgments |
|
xviii | |
|
|
|
2 | (36) |
|
|
|
5 | (18) |
|
|
|
6 | (1) |
|
The JSTL Expression Language |
|
|
7 | (1) |
|
|
|
8 | (15) |
|
|
|
23 | (7) |
|
|
|
23 | (1) |
|
The JSTL Reference Implementation |
|
|
24 | (2) |
|
Downloading and Installing a Servlet Container |
|
|
26 | (4) |
|
A Simple JSTL Web Application |
|
|
30 | (4) |
|
|
|
34 | (4) |
|
Naming Conventions for JSTL Actions |
|
|
35 | (1) |
|
Scoped Variables vs. Scripting Variables |
|
|
35 | (1) |
|
Static vs. Dynamic Action Attributes |
|
|
36 | (1) |
|
|
|
37 | (1) |
|
|
|
37 | (1) |
|
The JSTL Expression Language |
|
|
38 | (62) |
|
Expression Language Overview |
|
|
40 | (1) |
|
How the Expression Language Works |
|
|
40 | (1) |
|
How to Use the Expression Language |
|
|
41 | (1) |
|
|
|
41 | (2) |
|
|
|
43 | (1) |
|
|
|
44 | (18) |
|
|
|
45 | (1) |
|
|
|
45 | (1) |
|
Accessing JavaBeans Components |
|
|
46 | (6) |
|
Accessing Objects Stored in Arrays, Lists, and Maps |
|
|
52 | (4) |
|
A Closer Look at the Operator |
|
|
56 | (4) |
|
|
|
60 | (2) |
|
|
|
62 | (1) |
|
|
|
63 | (1) |
|
|
|
64 | (22) |
|
Accessing Request Parameters |
|
|
65 | (4) |
|
Accessing Request Headers |
|
|
69 | (3) |
|
Accessing Context Initialization Parameters |
|
|
72 | (2) |
|
|
|
74 | (4) |
|
Accessing Scoped Attributes |
|
|
78 | (2) |
|
Accessing JSP Page and Servlet Properties |
|
|
80 | (6) |
|
|
|
86 | (5) |
|
EL Expressions in Custom Actions |
|
|
91 | (4) |
|
|
|
95 | (5) |
|
|
|
95 | (1) |
|
Forgetting taglib Declarations |
|
|
96 | (1) |
|
Neglecting to Store Variables in a Scope |
|
|
96 | (1) |
|
Using Illegal Characters for Attribute Values |
|
|
97 | (1) |
|
Inadvertently Using Implicit Objects |
|
|
98 | (2) |
|
General-Purpose and Conditional Actions |
|
|
100 | (50) |
|
|
|
102 | (25) |
|
|
|
102 | (9) |
|
|
|
111 | (14) |
|
|
|
125 | (1) |
|
|
|
126 | (1) |
|
|
|
127 | (10) |
|
|
|
128 | (4) |
|
Mutually Exclusive Conditions |
|
|
132 | (5) |
|
Using Conditional and General-Purpose Actions Together |
|
|
137 | (8) |
|
Conditional Custom Actions |
|
|
145 | (5) |
|
|
|
150 | (48) |
|
|
|
154 | (12) |
|
Iterating Over Integer Values |
|
|
155 | (3) |
|
Iterating Over Data Structures |
|
|
158 | (8) |
|
|
|
166 | (5) |
|
|
|
171 | (7) |
|
Iteration Status for Integer Iterations |
|
|
172 | (2) |
|
Iteration Status for Data Structure Iterations |
|
|
174 | (4) |
|
|
|
178 | (20) |
|
Collaboration Custom Actions |
|
|
178 | (4) |
|
|
|
182 | (16) |
|
|
|
198 | (32) |
|
|
|
201 | (1) |
|
|
|
201 | (7) |
|
|
|
208 | (1) |
|
|
|
208 | (2) |
|
|
|
210 | (1) |
|
Accessing External Resources |
|
|
210 | (5) |
|
Accessing Resources in Foreign Contexts |
|
|
215 | (10) |
|
|
|
225 | (5) |
|
|
|
230 | (18) |
|
|
|
232 | (7) |
|
The FMT_LOCALE Configuration Setting |
|
|
235 | (1) |
|
Temporarily Overriding Configuration Settings |
|
|
235 | (4) |
|
|
|
239 | (9) |
|
Accessing Configuration Settings in Servlets |
|
|
240 | (2) |
|
Accessing Configuration Settings in Life-Cycle Listeners |
|
|
242 | (1) |
|
Accessing Configuration Settings in Custom Actions |
|
|
243 | (5) |
|
|
|
248 | (60) |
|
|
|
250 | (8) |
|
|
|
251 | (3) |
|
Multiple Resource Bundles |
|
|
254 | (1) |
|
|
|
255 | (3) |
|
|
|
258 | (5) |
|
|
|
258 | (1) |
|
|
|
259 | (1) |
|
|
|
260 | (3) |
|
|
|
263 | (1) |
|
An Overview of the 118N Actions |
|
|
264 | (1) |
|
|
|
265 | (22) |
|
Localization Context Lookup |
|
|
268 | (6) |
|
|
|
274 | (4) |
|
An Example of Dynamically Switching Locales |
|
|
278 | (5) |
|
Compound Messages and <fmt:param> |
|
|
283 | (4) |
|
|
|
287 | (6) |
|
|
|
293 | (15) |
|
Validation with JSP Pages |
|
|
296 | (8) |
|
Validation with a Custom Action That Uses javax.servlet.jsp.jstl.fmt.LocaleSupport |
|
|
304 | (4) |
|
|
|
308 | (48) |
|
Formatting and Parsing Numbers |
|
|
310 | (23) |
|
|
|
319 | (6) |
|
|
|
325 | (1) |
|
|
|
326 | (7) |
|
Formatting and Parsing Dates and Times |
|
|
333 | (10) |
|
Custom Patterns for Dates and Times |
|
|
336 | (7) |
|
|
|
343 | (9) |
|
Determining a Formatting Locale |
|
|
352 | (4) |
|
|
|
354 | (2) |
|
|
|
356 | (66) |
|
|
|
358 | (2) |
|
|
|
358 | (1) |
|
|
|
359 | (1) |
|
|
|
360 | (3) |
|
How JSTL Locates Data Sources |
|
|
363 | (2) |
|
|
|
365 | (13) |
|
Specify Your Data Source in the Deployment Descriptor |
|
|
366 | (3) |
|
Specify Your Data Source with <sql:setDataSource> |
|
|
369 | (3) |
|
Create Your Data Source in a Business Component |
|
|
372 | (6) |
|
|
|
378 | (20) |
|
|
|
378 | (4) |
|
Accessing Query Properties |
|
|
382 | (3) |
|
Scrolling Through Large Queries |
|
|
385 | (4) |
|
Prepared Statements and SQL Parameters |
|
|
389 | (9) |
|
|
|
398 | (13) |
|
|
|
399 | (1) |
|
|
|
400 | (7) |
|
|
|
407 | (4) |
|
Executing Database Transactions |
|
|
411 | (7) |
|
Implementing Database Custom Actions |
|
|
418 | (4) |
|
|
|
422 | (42) |
|
|
|
424 | (1) |
|
|
|
425 | (1) |
|
|
|
426 | (6) |
|
XPath Expressions and Types |
|
|
427 | (1) |
|
|
|
428 | (1) |
|
|
|
429 | (3) |
|
|
|
432 | (5) |
|
Using Scoped Variables in XPath Expressions |
|
|
437 | (6) |
|
Transforming XML with XSLT |
|
|
443 | (9) |
|
Using Transformation Parameters |
|
|
446 | (6) |
|
|
|
452 | (8) |
|
Accessing External Entities |
|
|
460 | (4) |
|
|
|
464 | (92) |
|
|
|
466 | (3) |
|
Exposed Classes and Interfaces Index |
|
|
468 | (1) |
|
|
|
469 | (5) |
|
|
|
474 | (5) |
|
|
|
475 | (3) |
|
|
|
478 | (1) |
|
|
|
479 | (6) |
|
|
|
480 | (3) |
|
Exposed Classes and Interfaces |
|
|
483 | (2) |
|
|
|
485 | (7) |
|
Internationalization Actions |
|
|
492 | (17) |
|
Overview of JSTL Internationalization Actions |
|
|
493 | (1) |
|
JSTL Internationalization Configuration Settings |
|
|
494 | (2) |
|
JSTL Internationalization Actions |
|
|
496 | (12) |
|
|
|
508 | (1) |
|
|
|
509 | (20) |
|
Overview of the JSTL Formatting Actions |
|
|
510 | (1) |
|
JSTL Formatting Configuration Settings |
|
|
510 | (1) |
|
|
|
511 | (18) |
|
|
|
529 | (14) |
|
Overview of JSTL SQL Actions |
|
|
529 | (1) |
|
JSTL SQL Configuration Settings |
|
|
529 | (2) |
|
|
|
531 | (10) |
|
Exposed Classes and Interface |
|
|
541 | (2) |
|
|
|
543 | (4) |
|
|
|
547 | (6) |
|
|
|
553 | (3) |
| A Setting Up the MySQL Database Used in This Book |
|
556 | (13) |
|
Download and Install MySQL |
|
|
558 | (2) |
|
Download and Install a JDBC Driver for MySQL |
|
|
560 | (1) |
|
Create a MySQL Database for Core JSTL Examples |
|
|
561 | (3) |
|
Populate the MySQL Database Used in Core JSTL Examples |
|
|
564 | (5) |
| Index |
|
569 | |