Manning Logo
Home | Ordering Info | Shopping Cart | Manage My Account | Login
Attention customers: online shopping is now available exclusively through our main website: http://www.manning.com. Thank you.
JSTL in Action

Inside the book

Sample Chapters Table of Contents HSQLDB Setup Index Preface Reviews Source Code Tomcat Setup JSTL Article Author Online

Manning Blog

Why small is sweet?

Author Blogs

Dave Crane more...

Author Calendar

Upcoming Events

Catalog

Java .NET Perl XML All by Subject All by Title

About...

Manning Contact Us Ordering FAQs ebooks Covers Sandbox Forums Distributors Manning Early Access Program (MEAP) Affiliate Program Academia/Publicity User Group Program Press Releases Jobs

Manning Publications Co.
209 Bruce Park Avenue
Greenwich, CT 06830

JSTL in Action
Shawn Bayern

2002 | 480 pages
ISBN: 1930110529
$39.95 Softbound print book  
$20.00 PDF ebook  

Index

Symbols

$
to introduce XPath variables 147
${}
for expression language 43ñ76
& 23
' 23
> 23
< 23
" 23
./

optional in XPath 166
<!--
HTML comments 34
<%--
comments in JSP pages 34
<%@ include %> 32
comparison with <jsp:include> 32
<%@ page %> 33, 267
<%@ taglib %> 29
?
placeholder in SQL query 204, 417
 
A
 
absolute URLs 117
action
definition 24
See also tag
Active Server Pages 5, 44
adultery 4, 11
alternating rows 112
America Online 118
ampersand
escaping in XML 23
ancestor tags 21
Apache Jakarta 13
See also Jakarta Taglibs, Jakarta Tomcat
Apache Software Foundation 173
API
JSTL 410ñ419
application scope 37
Arabic numerals 17
attributes
definition 19
ordering of within tag 19
scoped
   See scopes
authentication 302, 320ñ322
authType 66
 
B
 
<base>
HTML tag 27
<body>
HTML tag 5
body (of XML tags)
definition 17
empty 18
term, as substitute for content 17
body temperature 223
boldface
use in book xviii, 7
boolean
and conditional logic 79
creating 86ñ88
values 44, 67ñ70
variables 162
bracket
escaping in XML 23
browsers 4
bundles 216
bureaucracy 132
business logic 331
 
C
 
<c:catch> 263, 392
exposed information 265
<c:choose> 88ñ94, 394
canít use <x:when> 163
contrast with <c:if> 88ñ89
emulating with <c:if> 88ñ89
no attributes 90
serves as container 90
syntactic rules 93ñ94
XML library analog (<x:choose>) 160
<c:forEach> 102, 395, 413
begin, end, step 96, 101ñ104
exposing variable for body 97
introduction 96ñ98
iterating over numbers 96, 104ñ106
loop status 96, 106ñ112
paging 107ñ112
partial iteration 96, 101ñ104
scrolling over data 96, 107ñ112
subsetting 96, 101ñ104
supported Java types 97
varStatus 106ñ112, 255
XML library analog (<x:forEach>) 164
<c:forTokens> 102, 395, 413
begin, end, step 96, 101ñ104
introduction 96, 98ñ101
loop status 96, 106ñ112
parsing rules 100
varStatus 106ñ112
<c:if> 79ñ88, 394
contrast with complex conditionals 88ñ89
exposing booleans 86ñ88
nested tags 84ñ86
preventing empty <ul></ul> 84
relationships with other <c:if> tags 82ñ86
XML library analog (<x:if>) 160
<c:import> 396
advanced techniques 330, 335ñ338
character encoding 337
cross-context imports 121
and <c:set> 116, 125ñ127
exposing java.io.Reader 335
for page headers 128
from other web applications 121
replaces <jsp:include> 116
request parameters 124ñ125
and scoped variables 116, 125ñ127
sending request parameters 116
varReader 335
<c:otherwise> 88ñ94, 394
for default text 91
syntactic rules 93ñ94
XML library analog (<x:otherwise>) 160
<c:out> 393
as common tag 44
compared to other languages 44
default values 46
escapeXml 47
escapeXML attribute 47
first glimpse 8
introduction 44ñ48
special characters 47
within HTML tags 47
XML escaping 47
and XML output 47
<c:param> 116, 124ñ125, 396
<c:redirect> 116, 132ñ134, 396
<c:remove> 393
introduction 44, 74ñ75
<c:set> 393
introduction 44, 71ñ74
modifying Maps 334ñ335
setting JavaBeans properties 334ñ335
setting properties 331
tag body 72
use cases 73
with <c:import> 126
<c:spam> xix
<c:url> 116, 134ñ137, 295, 396
and context-relative URLs 136
and sessions 135
<c:when> 88ñ94, 394
compared to nursing cattle 90
compared to selfish child 91
contrast with <c:if> 88ñ89
syntactic rules 93ñ94
XML library analog (<x:when>) 160
Cable News Network 121, 155
Calendar 368
case sensitivity
and XML 21
in SQL 429
case statements 90
cat
allergies to 308
cattle
nursing 90
Chalmers, David 56
channels 303
character encoding
description of 337
chat rooms 9
checkboxes 60
reading multiple 252ñ257
child tags
and <c:if> 84ñ86
definition 20
client/server
definition 4
closing tags
See end tags 21
COBOL 5
Cocoon 173
ColdFusion 5, 44
colon
in URL 118
in XML tags 19
in XPath variables 147
columnNames
accessing metadata with 193
comments
definition 33
HTML 309
Common Gateway Interface 5
communication protocols 9
comparisons
between values 67ñ69
complex conditions
with XML 154, 162ñ164
ConditionalTagSupport 362, 366ñ378, 415
conditions 8
creating conditional tag libraries 362
creating custom conditional tags 366ñ378
definition 78
mixing regular and XML 163
mutually exclusive 77, 88ñ94
simple 77, 79ñ88
custom tags and 410, 413ñ415
Config 410
Config class 350
configuration 410ñ412
configuration variables 330, 349ñ355
API 410ñ412
context path 66
context-initialization parameters 66, 351
access from XPath 148
context-relative URLs 120
control flow
based on XML documents 159ñ169
cookies 65ñ66
accessing from XPath 148
sessions without 135
cows 90
CREATE TABLE
SQL keywords 200, 423
CSS 437
currencies 8, 219ñ222
formatting 222
current date
determining 227
custom tags
conditions and loops 410, 413ñ415
 
D
 
Data Definition Language 422
Data Manipulation Language 422
databases 182ñ214, 300
columns 191
connection pooling 188
DataSources 185ñ189
defaults 185ñ189, 330, 349ñ355, 410ñ412
deletions 199ñ201, 214
erroneous queries 202
examples 280ñ300
insertions 199ñ201, 214
integrity of data 182
and Java code 415ñ417
metadata 192
queries 189ñ199, 214
query parameters 201ñ206
relationships between tables 428
results, organization of 191
rows 191
for storing information offline 182
tables 422
transactions 206ñ211
updates 199ñ201, 214
versus scoped variables 182
versus text files 182
when to use JSTLís support for 182ñ185
DataSource 185ñ189, 353
dates 216
<sql:dateParam> 205
current 227
formatting 216, 227ñ232
ISO format (8601) 238
parsing 216, 236ñ238
patterns 230, 238
printing 216, 227ñ232
reading 216, 236ñ238
time zones 216, 238ñ242
user input 252, 257ñ261
dateStyle 230, 237, 260
Davies, David 98, 204
declarations 331
defaults 330
for JSTL tags 349ñ355
setting with Java code 410ñ412
dehydration 97
DELETE
SQL keyword 200, 427
deleting variables 74ñ75
delimiters
definition 99
deployment descriptors 351
DESC
SQL keyword 298
descendant tags 21
directives
See <%@ taglib %>, <%@ include %>, <% page %> 29
dirty reads 211
division of labor 331
related to web architecture 12
DML 422
doAfterBody() 363
Document Object Model 339
doGet() 345
dollar sign
to introduce XPath variables 147
doPost() 345
doStartTag() 363
Dreamweaver 5
DriverManager 353
driving directions
See also XSLT
compared to HTTP response 4
DROP TABLE
SQL command 424
dynamic content
and control over layout 78
definition 4
introduction 4ñ9
 
E
 
efficiency
See performance 33
elements
definition 18
empty 18
email 362
empty 69, 391
empty elements
See elements, empty
end tags
required in XML 21
enterprise applications 11ñ14, 184
entity
as informal term for entity reference 23, 47
error flags 86ñ88
error handling 261ñ268
in portal 308ñ309
repopulating forms 274ñ277
restoring form input 276
error messages 67
printing conditionally 77, 82ñ87, 89
error pages 33, 261
errorPage
See error pages
escapeXml
attribute of <c:out> 47
escaping
See also escapeXml
special XML characters 23
evaluating expressions 44ñ48
exceptions 67, 261, 263ñ268
execution, program
definition 9
expression language
- (binary) 51
- (unary) 51
! 69ñ70
!= 44, 67ñ69
${ 45
&& 69ñ70
* 51
+ 51
. 52
/ 51
<= 44, 67ñ69
== 44, 67ñ69
>= 44, 67ñ69
|| 69ñ70
addition 51
and 44, 69ñ70
applicationScope 49
arithmetic 51
boolean values 44, 67ñ70
brackets, square 44, 64
checking for missing values 44, 69
comparisons 44, 67ñ69
context-initialization parameters 66
cookies 65ñ66
data types 50, 55
div 51
division 51
empty 44, 69
eq 44, 67ñ69
equality 44, 67ñ69
ge 44, 67ñ69
greater than 44, 67ñ69
grouping 44, 69ñ70
gt 44, 67ñ69
headers 65
headerValues 66
indirect reference of properties 64
initParam 66
interaction with Java classes 330
interaction with Java code 344ñ349
le 44, 67ñ69
less than 44, 67ñ69
logical operators 69ñ70
lt 44, 67ñ69
mod 51
modulus 51
multiple expressions in same attribute 70
multiplication 51
ne 44, 67ñ69
not 44, 69ñ70
not allowed in var, scope 71
null 44, 69, 391
numbers 50ñ51
operator precedence 44, 69ñ70
or 44, 69ñ70
pageContext 66
pageScope 49
parameters 55ñ63
paramValues 252ñ257
parentheses 44
property access 44, 52, 64
purpose 44
reference 390
remainder 51
request parameters 44, 55ñ63
requestScope 49
scoped variables 44, 48ñ55
sessionScope 49
strings 50
subtraction 51
variable access, basic 48
variables 48ñ55
where valid 46
Extensible Markup Language
See XML
Extensible Stylesheet Language Transformations
See XSLT
 
F
 
<fmt:bundle> 216, 245ñ248, 408
<fmt:formatDate> 216, 227ñ232, 260, 406, 419
dates versus times 228
fine-grained control 230
no tag body 227
time zones 239
times versus dates 228
verbosity 229
<fmt:formatNumber> 216ñ219, 405
as cause of slight fevers 224
contrasted with <c:out> 217
currencies 219ñ222
digit grouping 222
fine-grained control 223ñ227
parsing rules 235
percentages 219ñ222
scientific notation 226
tag body 218
<fmt:message> 216, 245ñ248, 408, 418ñ419
parameters 246
<fmt:param> 216, 245ñ248, 408, 418
<fmt:parseDate> 216, 260, 406, 419
parsing rules 237
patterns 238
time zones 239
<fmt:parsedate> 236ñ238
<fmt:parseNumber> 216, 232ñ236, 405, 419
rationale 233
<fmt:requestEncoding> 330, 343ñ344
<fmt:setBundle> 216, 245ñ248, 408
<fmt:setLocale> 216, 242ñ245
<fmt:setTimeZone> 216, 238ñ242, 407
<fmt:timeZone> 216, 238ñ242, 407
<form>
HTML tag 44, 55ñ63
method 57
File Transfer Protocol 118, 121
first page 4
floating-point numbers 51
flow control
definition 78
footers 128ñ130
forms 6
check
   boxes 252ñ257
date input 257ñ261
filling in 274ñ277
HTML 44, 55ñ63
prepopulating 274ñ277
validation of 268ñ277
forwarding of web requests
definition 12
functional programming 169
 
G
 
GET 57
getRemoteUser 322
gingivitis 97
globalization 216
groupingUsed 222
guest book 280, 291ñ300
 
H
 
<head>
HTML tag 29
headers 65, 128ñ130
accessing from XPath 148
with <c:import> 128
hidden form fields 285
highlighting
use in book xix
highway lanes 79
Hillhouse Avenue 170
hit counter 312
example 182, 211ñ213
hsqldb 186, 434, 435
HTML 4
as application of XML 16
comments 309
embedded into programs 12
knowledge of 16
reference 437
static nature of 4
HTML editors 5
HTML forms
check boxes 253
date input 258
filling in automatically 276
hidden fields 285
password boxes 58
restoring user input 276
selection boxes 59
submission 62
text areas 61
text boxes 58
user registration 314
validation 252
HTML tags
JSTL tags within 48
HTTP 9, 436
GET 57
methods 57
POST 57
HTTPS 322
HttpServlet 345
Hypertext Markup Language
See HTML
Hypertext Transfer Protocol
See HTTP
 
I
 
<input>
HTML tag 44, 55ñ63
i18n
See internationalization
imperative programming 169
implicit objects
compared to XPath variable prefixes 147
importing text 116ñ132
index
within loop 102
initialization parameters 148
initParam 352
input
reading from users 55ñ63
input validation 252, 268ñ277
InputStream 337
INSERT
SQL keyword 200, 424
internationalization 216ñ248, 417ñ419
bundles 216, 245ñ248
client experimentation with 218
currencies 219, 222, 232ñ236
date formats 216
dates 227ñ232, 236ñ238
localized text 216, 245ñ248
number formats 216
numbers 216ñ219, 232ñ236
percentages 219ñ222, 232ñ236
time zones 216
times 227ñ232, 236ñ242
Internet Explorer 5, 175, 217
irrigation, nasal 303
isErrorPage 266
ISO 8601 238
ISO-8859-1 337
isolation levels 210
iteration 78, 96
 
J
 
<jsp:forward> 26, 28, 274
circular loops 28
<jsp:include> 26
comparison with <%@ include %> 32
versus <c:import> 116
<jsp:useBean> 333
to retrieve current date 227
Jakarta project
See Apache Jakarta
Jakarta Taglibs 434
Jakarta Tomcat 10, 120
JA-SIG 173
Java
as basis for JSP 10
JSTL APIs for 410
Java classes
for programmers 416
Java Community Process xiii, 436
Java Message Service 362
Java Naming and Directory Interface 362
Java servlets 12
java.io.Reader
with 335
java.sql.DriverManager 353
JavaBeans 330, 344ñ349
JavaScript 4ñ5, 44, 147, 268
JavaServer Pages
See JSP
javax.servlet.* 416
javax.servlet.jstl.core.Config 350
javax.sql.DataSource 353
javax.xml.transform.Result 343
JDBC 186, 353, 435
JSP 5
actions
   See tags 24
as basis for JSP 6
as basis for JSTL 9ñ11
errorPage 261
introduction 23ñ39
Java code within 330ñ334
JSTLís advantages and 6
among other languages 5
recompiling pages 33
scopes 34
scripting elements 330ñ334
specification 436
tag-extension API 362ñ366
tags 24
as template system 9
web applications, term 120
JSP container
definition 10
reference to installation instructions 10, 120
JSTL
API 410ñ419
and basis on JSP 23
compared to XSLT 170
core library 31
formatting library 31
inside HTML tags 24
importing into pages 31
mixed with template text 24
multiple tag libraries 30
and national holidays 281
online specification 434
recommended taglib prefixes 30
reference implementation 434
SQL library 31
taglib URIs 30
XML library 31
and XML syntax 20
 
K
 
ketchup 144
 
L
 
libraries
See tag libraries 24
lightning
server struck by 206
LIMIT
SQL keyword 199
limitedByMaxRows 193, 198
listeners 345
locales 242ñ245
configuring 355
default 330, 349ñ355, 410ñ412, 419
fallback locales 355
identifying 243
LocaleSupport 417
localization 216
algorithms 417ñ419
LocalizationContext 419
loops 8, 96ñ113
beginning with 0 102
creating custom loop tags 378ñ387
definition 78
indexes within 102
over XML nodes 164ñ169
and scrolling over data 96, 107ñ112
status within 96, 106ñ112
subsetting 96, 101ñ104
writing custom tags 410, 413ñ415
and XML 154
LoopTag 413
LoopTagStatus 106ñ112, 413
interface 107
LoopTagSupport 362, 378ñ387, 414
 
M
 
Macromedia 5
Mad-Libs
similarity to JSTL 7
mail merge
compared to JSTL 6, 78
maintainability
of web sites 12
malpractice 85
maxFractionDigits 225
maxIntegerDigits 225
maxRows 354
message board 280, 291ñ300
posting messages 298
Microsoft 5, 281, 436
SQL Server 182
Windows 218
minFractionDigits 226
minIntegerDigits 226
mod_perl 5
Model-View-Controller 13
mutually exclusive conditions
see conditions, mutually exclusive 77
with XML 162ñ164
myopia 97
MySQL 182, 436
 
N
 
namespace
and JSTL tags 20
and XPath 148-149
definition 19
JSTL taglib prefixes 19
nasal irrigation 303
national holidays and JSTL 281
nested tags
See child tags 21
New Haven 170
node-sets (XPath) 159
non-repeatable reads 211
NULL
SQL keyword 424
nullv
expression-language keyword 391
numbers 216
digit groupings 222
formatting 216ñ219
parsing 216, 232ñ236
patterns, numeric 226, 236
printing 216ñ219
reading 216, 232ñ236
scientific notation 226
N?menor 154
 
O
 
<option>
HTML tag 59
OíDavies, David 202
OFFSET
SQL keyword 199
opening tags
See start tags 21
Oracle 182, 436
ORDER BY
SQL keywords 298
org.w3c.dom.Document 339
org.xml.sax.XMLFilter 341
outputting data 44ñ48
 
P
 
page scope
introduction 36
pageContext 66
page-relative URLs 119
pageScope
in XPath 148
paging (over data) 96, 107ñ112
parameters 44, 55ñ63, 124ñ125
detecting missing 69
paramValues 252ñ257
parent tags
definition 20
Parliament, British xiii
parseLocale 235, 245
tag attribute 216, 242ñ245
parsing
definition 98
XML documents 154ñ156
password boxes 58
patriotism
and XML 140
percentages 219ñ222
performance 33
Perl 6
PermittedTaglibsTLV 356
personalizing content 302, 320ñ322
phantom reads 211
phone numbers
and URLs 118
PHP 5, 44
plusmail xvi
polling applications 280ñ291
polls
web-site feature 280
pooling
carpooling 188
of database connections 188, 353
portals 302ñ325
authentication 302, 320ñ322
channels 303
error handling 308ñ309
layout 302ñ309
personalization 302, 320ñ322
user registration 302, 313ñ320
POST 57
PostgreSQL 182, 197, 436
prefixes
for bundles 248
See namespace prefixes
pregnancy
mammalian 20
PreparedStatement 417
printing data 44ñ48
protocols, communication 9
 
Q
 
qualified name 19
and XPath variables 147
query parameters 295
query string 67, 110
quotation marks
and attribute values 21, 23
escaping in XML 23
 
R
 
radio buttons 60
Rambaldi, Milo 47
RDBMS 182
read_committed 211
read_uncommitted 211
Reader
versus InputStream 337
redirection 116, 132ñ134
definition 132
registering users 302, 313ñ320
rejection
romantic 60
relational database management systems 182
relative URLs 117
remainder
for alternating rows 112
remote user 66
removing variables 74ñ75
repeatable_read 211
repetition 96
request 345
definition 9
request parameters 44, 55ñ63, 116, 124ñ125
access from XPath 148
character encoding 330, 343ñ344
hidden form fields 285
in URL 295
syntax in URL 111
request scope
and <jsp:include>, <jsp:forward> 37
introduction 37
request URL 67
request/response model
definition 9
requestScope
in XPath 148
requirements
for running JSTL 9ñ11
resource bundles 245
ResourceBundle 419
response 345
definition 9
Result 415
ResultSet 416
ResultSupport 416
Rich Site Summary
See RSS
rodents
and JSP scopes 34
root element
of XML document 141
rowsByIndex
accessing data with 193
RSS 154, 175ñ179, 302, 309ñ311, 435
namespaces and XPath 177
rtexprvalues 330
JSTLís support for 332
 
S
 
<select>
HTML tag 59
<sql:dateParam> 205, 403
<sql:param> 182, 201ñ206, 403
body of 205
<sql:query> 182, 189ñ199, 281, 402, 415, 422, 427ñ429
data access 193
executing query with 190
limiting result sizes 197
maxRows 197
metadata access 192
reading results of 191
startRow 197
with <sql:param> 202
<sql:setDataSource> 182, 185ñ189, 280, 401
JDBC and 186
performance problems 188
<sql:transaction> 182, 206ñ211, 404
isolation 210
<sql:update> 182, 199ñ201, 281, 403, 422ñ427
measuring effect of 200
with <sql:param> 202
schemes (URL)
definition 118
scientific notation 226
scope (attribute)
conventional use in JSTL 71
defaults to page 71
legal values 71
no expressions 71
scoped variables
boolean 44
creating 44
deleting 44
exposing from Java 330
and expression language 44
for database results 193
modifying properties of 331
removing 44
setting 44
and XML 154
scopes 34ñ39
See also page scope, request scope, session scope, application scope 36
ScriptFreeTLV 356
scripting declarations 331
scripting elements 330ñ334
discouraging 331, 355ñ358
preventing 331, 355ñ358
warning against 331
scripting expressions 330
scripting variables 333
scriptlets 330
scrolling (over data) 96, 107ñ112
search-engine results 107ñ112
Secure Sockets Layer 322
security 202, 355
authenticating users 302, 320ñ322
SELECT
SQL keyword 190, 427
selection boxes 59
multiple 60
separation 12, 184, 331
serializable 211
server information, retrieving 67
servlets
and databases 183
definition 12
exposing scoped variables from 345
session rewriting 116, 135ñ137
session scope
introduction 38
sessionScope
in XPath 148
session
See also session scope 38
setting variables 71ñ74
simple conditions 77, 79ñ88
and XML 154, 160ñ162
site organization 302ñ325
Slashdot 324, 435
source page (importing)
definition 117
SPath 342
SQL 422, 435
case sensitivity 429
column constraints 424
CREATE TABLE 423
DELETE 427
deletions 199ñ201
DROP TABLE 424
expressions 425
INSERT 424
insertions 199ñ201
introduction 422ñ431
in JSTL tags 182ñ214
JSTL tags for 182
parameters 417
printing entire tables 427
queries 189ñ199
query parameters 201ñ206
SELECT 427
transactions 206ñ211
UPDATE 425
updates 199ñ201
whitespace 429
SQL Server, Microsoft 182
SQLExecutionTag 417
static text 6
strings
parsing 98ñ101
Structured Query Language 182
See SQL
Struts 13
Sun Microsystems 434
surveys 280ñ291
switch statements (<c:choose>) 88ñ94
systemId 340
 
T
 
<table>
HTML tag 78
<textarea>
HTML tag 61, 275
tag libraries 29ñ32
conditions and loops 413ñ415
conditional tags 362, 366ñ378
configuring 362
creating 362ñ387
custom 362ñ387
definition 24
installing and using 362ñ366
iteration tags 362, 378ñ387
loop tags 362, 378ñ387
rationale for term 8
restricting use of 357
tag-library descriptors 362ñ366
TagLibraryValidator
JSTL support for 355ñ358
support provided by JSTL 331
tags
definition 18
JSP tags inside HTML tags 24
JSP, syntax 24
mixing HTML with 24
overlapping 23
standard JSP 25
term, as substitute for action 24
target page (importing)
definition 117
template systems 23
introduction 6
template text
definition 6
and SQL queries 202
text areas 61
text boxes 58
Throwable 266
time zones 216, 238ñ242
default 330, 349ñ355, 410ñ412
how JSTL determines 239
times 216
timeStyle 230, 237
timeZone 239
attribute 216
tag attribute 238ñ242
tokens 98ñ101
definition 98
Tomcat 10, 120, 434
transactions 206ñ211
definition 207
transformations
of XML documents 169ñ175
trees
and XML documents 140ñ142
Twenty Questions 88
 
U
 
Uniform Resource Locators
See URL
Universal Resource Identifiers
and tag libraries 30
for JSTL taglibs 30
University of Kentucky 118
UPDATE
SQL keyword 200, 425
uPortal 173
URIs
See Universal Resource Identifiers
URL 30
absolute 117
absolute vs relative 117ñ121
compared to phone numbers 118
context-relative 120
importing data from 117, 121ñ132
managing with <c:url> 116, 134ñ137
page-relative 119
query strings 110
relative vs absolute 117ñ121
retrieving data from 117, 121ñ132
user authentication 320ñ322
user registration 302, 313ñ320
UTF-8 344
 
V
 
validation 252, 268ñ277, 331
client-side 268
VALUES
SQL keyword 425
var attribute
conventional use in JSTL 71
no expressions 71
VARCHAR
SQL type 282
varDom 339
variables
boolean 67ñ69
and <c:import> 125ñ127
creating 71ñ74
creating booleans 86ñ88
deleting 74ñ75
exposing from Java 344ñ349
and expression language 48ñ55
modifying properties of 334ñ335
removing 74ñ75
scoped 34ñ39, 48ñ55
scoped
   See also scopes
setting 71ñ74
and XML 158ñ159
varReader 335
varStatus 106ñ112
View Source
to see HTML code 5
votes
online survey 280
voting applications 280ñ291
 
W
 
waste-generator training, hazardous 118
web addresses 117
web browsers
determining type of 66
inconsistencies 4
web pages
as reactive to requests 9
web programs
versus traditional programs 6
web request 9
web response 9
web.xml 351
WEB-INF directory 366
WHERE
SQL keyword 425
whitespace
in SQL 429
Wireless Markup Language 6, 12
World Wide Web Consortium 437
 
X
 
<x:choose> 154, 162ñ164, 399
canít use <c:when> 163
<x:forEach> 154, 164ñ169, 400, 413
nested iteration with 167
and XPath context 166
<x:if> 154, 160ñ162, 399
<x:otherwise> 154, 162ñ164, 399
<x:out> 154, 156ñ158, 398
<x:param> 174, 401
<x:parse> 154ñ156, 397
and acquiring documents 155
advanced techniques 338ñ343
and <c:import> 155
and source of documents 155
systemId 340
varDom 339
<x:set> 154, 158ñ159, 398
<x:transform> 154, 169ñ175, 400
Result objects 343
system identifiers 340
xmlSystemId 340
xsltSystemId 340
<x:when> 154, 162ñ164, 399
XHTML
as stricter HTML 6
XML
advanced JSTL support 330, 338ñ343
attributes 16
as basis for web content 6
comparison to Arabic numerals 17
data formats 338
entity references 47
escaping 47
filters 341
formal terminology 18
introduction 16ñ23
Java APIs 436
namespaces 148ñ149
relationships between tags 20
special characters 47
specification 436
syntactic rules 21ñ23
system identifiers 340
well-formed 19
XML documents
and control flow 159ñ169
locating with XPath 156
looping over 164ñ169
parsing 154ñ156
printing text from 156ñ158
as root for XPath expression 156
selecting fragments from 140ñ152
tree structure 140
XML namespaces
See namespace
XML Path Language
See XPath
XPath 140ñ152, 169, 435
/ 142
// 143
@ 144
applied 169
axes 140, 149ñ150
basic syntax 140, 142
compared to file paths 142
contexts 140, 150ñ151
cookies 148
and element order 145
further reading 151
headers 148
in JSTL tags 156ñ169
name() function 149
namespaces 177
and namespaces 148ñ149
namespace-uri() function 149
nodes 140, 149ñ150
node-sets 159
pageScope 148
predicates 145
qualified names 147
request headers 148
request parameters 148
requestScope 148
return values 146
rooted in scoped variables 156
sessionScope 148
specification 436
and tag attributes 144
tying to documents 156
type mappings in JSTL 398
types 146
unexpected failure to match tags 149
variables 140ñ148
view of XML documents 140ñ142
XSLT 140, 154, 169ñ175, 435
advantages of JSTLís support for 174
chaining transformations 172
compared to JSTL 170
disadvantages of 170
multiple transformations 172
parameters 174
rant against 170
specification 437
 
Y
 
yogurt
low-fat 397

DESCRIPTION

Visit the Author's book site: www.jstlbook.com

JSTL is an important simplification of the Java web platform. With JSTL, page authors can now write dynamic pages using standard HTML-like tags and an easy-to-learn expression language. JSTL is a standard from the Java Community Process, and its expression language will become part of JSP 2.0.

JSTL in Action shows you how to write rich, dynamic web pages without programming. From simple loops to tricky XML processing, every feature of JSTL is covered and exercised in numerous useful examples. Whether you are a novice page author or an experienced Java programmer, this book shows you easy ways to create powerful web sites.

To help readers who don't already have a JSP container run the examples in the book, there's a free companion download here. This bundle contains a ready-to-run JSP container, a JSTL implementation, and all the book's examples.

What's Inside:

  • Mixing HTML tags and JSTL
  • JSTL's expression language
  • Working with loops and conditions
  • Painless XML processing
  • Accessing databases
  • Text formatting
  • Internationalization
  • JSTL configuration and performance
  • Many examples including
    • How to register and authenticate users
    • Running an online survey
    • How to build a discussion forum
    • Designing a web portal

ABOUT THE AUTHOR...

Shawn Bayern is a research programmer at Yale University and coauthor of Manning's Web Development with Java Server Pages. He is the reference implementation lead for JSTL.

Home | Catalog | Privacy Policy | About Manning

© 2003-2006 Manning Publications Co.