Index


 
Symbols\Numerics

< character 68
# character 67
{0} 63
{0}/{1}
default message for layout pager 239
401 unauthorized 320

 
A

Abstract Action 155–156
Abstract Base Action 154
Abstract Struts Action 154, 157
abstraction 405
acceptance 62
acquire resources 353
Action
guarding 319
protext 319
Action authorization
override 342
action mapping
input attribute 247
parameter attribute 270
protect 336
validate attribute 246
ActionErrors 45–46, 48, 51, 58, 63, 65, 245–246, 256, 261, 263, 273, 341, 387–388, 390, 430–431, 434
format 247
ActionErrors.GLOBAL_ERROR 45
ActionForm
responsibility 268
validate 244
validation 336
ActionForward
and jsessionid 18
default application 14
default application from URL 14
discussed 15
not used in web.xml 15
recipe explained 14
recipeActionForward 14
redirected 18
transfer from index.jsp 15
using constants 33
using DynaActionForms 40
ActionMapping
extend 306
type attribute 308
<action-mappings/> 249
ActionMessage 47–48, 51, 54, 60–61, 63–66, 68–69
actions
exposing to page 140
keep short – best practice 236
ActionServlet 22, 336, 339, 353–357, 384–385, 446, 465
responsibilities 339
adapter 364
Adobe 371
download 372
advisory title 303
aggregate, errors 44
AggregateException 266
AggregateExceptionHandler 267
airline reservation 62
Alert Window 322
alternate row colors 80
alternate text 303
altKey 303
analyze 345
anomalies 438
anonymous 318
Ant 3, 13, 250
acronym explained 7
best practice 13
build.log output 12
build.properties 11
substitution parameters 12
build.properties code listing 11
build.properties file 9
build.xml file 9
Cactus 439
command 9
compile-domain target 10
create build.xml 7
create script 7
defacto build tool 3
default project attribute 9
directory naming 28
DynaActionForm 40
embedding version numbers 12
explained 3
first steps 7
<javac> tag 10
jCoverage 463
JSP, declaring location 10
JUnit 427
mail tag 10
parameters 13
powerful tool 13
recipe 6
recipe description 6
reusable scripts
best practice 13
running 9
separate deployment and development 4
standard project properties 9
tag 10
testing 436
used daily 13
WAR file, declaring location and name 10
Apache Digester 423
Applets, option for Struts 2
application
intuitive 62
quality 50
application context 354
Application Server
JBoss 3
Weblogic 3
Websphere 3
application usability 53
application.proprties 268
architecture 318
args, with layout pager 239
arguments
for layout pagerStatus tag 240
array 63
ASCII 89
ASCII codes 89
ASP 158
associate 52
attributes
for layout tab tag 231
of skinResources 201
of tab and tabs tags 230
audience 62
audit 329
authenticate 327, 336, 347
authentication 318
base64 320
basic 320
container-based 319
domain-level 320
HTTP digest 321
HTTP form 321
HTTPS Client 321
mechanisms 320
realm 324
SSL 330
strategy 319
authorization 318, 320
automated 436, 438, 468
Ant best practice 13
ant build 6
build process 13
functional testing 13
testing 444
automated build 462
autonomous teams 449

 
B

B2C 351
back button 417
and crumbs 223
backwards compatibility 364
backwards navigation 218
batch program 391
<batchtest> 443
Bayern, Shawn 140
BEA WebLogic 438
<bean:message> 46, 299
format 65
bean:write 114
<bean:write> 47
beginXXX() 439
BodyTagSupport 82
bookmark 406
Boolean, logic present tag 128
browser support 371
buffer 73, 94
flush 369
build.properties 7
build.xml
adding resource bundles 28
bundle, attribute and tabbed panes 226
Burst Test 456
business errors 256
business exceptions 398
business façade 367, 373, 394
business layer 70, 73, 79, 256, 306, 329, 372, 393, 396
responsibilities 393
business logic 58, 377
and tag libraries 100
sensitive 320
Business Objects
and Action class 97
deciding how MVC works with, 103
business rules 58
BusinessException 258
Business-to-Consumer 349
byte code injection 466
ByteArrayOutputStream 369
bytecode 378

 
C

cache 72, 78–79, 423
Struts 79
caching 273, 352–353, 357, 400, 417–418, 461
strategy 400
cactify 443
Cactus 426, 428, 437–440, 442–444
Ant tasks 442
build.properties 444
connect to Tomcat 443
lifecycle 439
mergewebxml attribute 443
port attribute 443
proxy redirector 438
report format 443
report location 443
report.xsl 442
servlet example 443
StrutsTestCase 444
Tomcat 443
Tomcat shutdown 443
Tomcat startup 443
war file 443
web.xml 443
Cactus lifecycle 439
<cactus> 443
CactusStrutsTestCase 428, 433, 437, 439
cactus-web.xml 441
Castor 368
certificate keystore, create 331
CGI vs. tag libraries 100
challenge 336
change, constant 417
changeRowColor, JavaScript and selected row 205
Choice format 67
cipher 329, 335
circumvent navigation 406
class loader 72, 369, 385, 415
ClassCastException 404
problem with integers 119
classpath 299, 383, 418
clean up session objects 153
client side tabs recipe 232
coarse-grain 338
Cocoon, option for Struts 2
code branches 462
code changes, not required 72
coffee 318
cognitive 50
collate 57
collection 81
errors 50
messages 47
collections and bean define tag 121
color code 80
colors, sets 80
colspan, attribute used in tabbed panes 228
column sort with Struts-Layout tags 173
comma delimited 336
Comparable 448
comparator 448
complex applications
and logic present tag 137
in team environments 148
complex conditional logic 306
complex views with logic present tag 128
complexity 395–396, 455
ComponentContext 360
composition 378
confidentiality 329
configuration parameters
runtime 70
configure, tasks for Struts-Layout use 175
confirmation 62
<constant> 278
<constant-name> 278
<constant-value> 278
Constants
java code 32
java file 32
recipe 32
constructor 45
container managed security 327
<containerset> 443
Content-Disposition 90
ContentLength 369
ContentType 369
Continuous Performance Testing 455
contracts 450
control
and actions 98
message queue 55
controller 339
controller tag 95, 296, 340
Controller, action class, keep short 236
<controller/> 249
<controller> 94, 408
controllerClass 359, 362
ControllerSupport 360
controllerUrl 362
controls, types 328
cookie 321, 416
country code 300
coupling 376, 393
Struts 402
coverage testing. See testing
coverage testing tool 462
createResources 419
critical decisions and tag library use 99
critical success factor 455
CRUD 270, 378, 391
crumbs
browser view 221
controlling boundaries 223
customizing 223
listing for dynamic 221
method to limit crumb size 223
navigation best practices 224
separator attribute 223
setting 223
tag listing 221
crumb-trails, dynamic and static 218
cryptographic algorithm 329
CSS 321
and accessing bean resource 145
and logic present tag 130
and MVC 99
contextual elements with layout panel 190
default directory with Struts-Layout tags 194
extra CSS files with Struts-Layout tags 201
image references with Struts-Layout tags 194
in JSPs 38
interation with layout panel tag 190
linking stylesheets recipe 37
listing for layout panel tag 188
listing with layout panel 191
location of 176
placement 37
relative paths 37
skins with Struts-Layout tags 193
solid references 6
Struts-Layout simple table 180
style block for complex table 186
style blocks and Struts-Layout tags 193
styleClass attribute
layout panel tag 190
with custom skin 195
with layout panel tag 188
with selectable rows 202
with Struts-Layout tags 174, 177, 180, 186–187, 189, 191, 193–194, 196, 199–200, 205, 214, 216, 219, 223, 228–229, 232, 238
"onglet" prefix 230
attributes for tab(s) tags listed 231
attributes in tab(s) tags 230
browser view 230
custom skins 196
details for tabs 226
French namespaces 229
layout pager tag listing 237
listing for tree navigation 214
listing for use with tabbed panes 229
pager tag 233
special tabbed pane classes 228
styleClass declaration with layout pager tag 238
tab(s) attributes listed 231
tabbed panes 226
classes explained 230
table listing for tabs classes 232
tree navigation 208, 214, 216
eccentricities 216
tree navigation debugging with 216
wire diagram reference 229
with layout pager tag 237
with layout pagerStatus tag 240
CSS Style Sheets linked with html rewrite tag 150
cultural differences 309
culturally friendly 309
custom JSP tag 80
custom message queue 53
custom queue 55
custom skins
and layout skin tag 195
creating 201
custom validator 312

 
D

DAO 392
create dynamically 402
declarative 402
factory 402, 404
Data Access Object Pattern 392
data input 75
Data Mapper pattern 378
data source layer, persistence layer 393
data store 398
data transfer object 256, 268
data validation 268
data, insert 62
database 73, 256, 321, 329, 378, 406, 417
access 418
dialect 383
driver 383
minimize access 418
type 378
database connections 357, 364, 461
database server, start 379
DB2 379
debugging 379
declarative exception handling 243, 256, 342, 390–391, 396
employ 342
exceptions aggregate 261
how works 256
use case 257
declaratively 316, 330
decorates 460
decouple 417
decrypt 329, 335
dedicated environment 455
default Action classes
for Struts-Layout 177
default.css and layout skin tag 194
defensive copy 357
define contracts 450
definitions and Tile mappings 162
delegate 339, 367
delineate 90
denial-of-service attack 94
deployable artifacts 443
build process 6
deployment 417
design by contract 450
design patterns 55
vs. reality 171
design practice, contracts 450
design refactoring 462
destroy() 353–355, 357, 385
dialog box 320
Digester 415, 423
rules 415
stack 415
directory for layout tags 199
disaster recovery 352
DispatchAction 268
reflection 270
use 270
doAfterBody 84
document management
and logic equal tag 135
doGet 353
domain authentication 319
domain layer, business layer 393
domain model 378
doPost 353
doStart 84
doStartTag 84
drawbacks 44
DTO 256, 268
DynaActionForms 41, 444–445
and logic equal tag 135
getting variables from form bean 40
pitfalls 41
recipe 38
recipe description 6
recipe explained 38
StrutsTestCase 444
testing. See testing
useful 444
DynaBean interface 445
DynaBean property values 445
DynaClass 445, 447
DynaForm testing
assertions 445
dynamic 62
dynamic content 125
dynamic messages 44
dynamic tables with paging 233
DynaProperties 445
DynaPropertiesHelper 447
DynaPropertyComparator 448

 
E

easy to use 62, 71
Einstein 369
EJB 357, 405–406, 423, 461
elements
hiding with logic present tags 127
email 249
encapsulate 45
encapsulate business logic 367
encapsulation 392
encode 89
automatic 89
scheme 89
encrypt 329–330, 335
encryption 321
endXXX() 439
<engine> 324
Enumerate contracts 450
environment 444
ergonomic 79
error handling mechanisms 256
error messages
list 57
placement 50
purpose 44
error page 322
error queue 50
error scenarios 256
errors
and logic present tag 127
categorize 57
generalized 49
list 62
errors.footer 46, 246
errors.header 46, 246
exception handler 341–342
default 261, 266
exception strategy benefits 261
ExceptionHandler 256, 261, 263
extend 267
exceptions 41, 65, 258, 262, 264, 267–268, 390, 398
aggregate 243
bulking 262
business layer 267
class hierarchy 257
classification 257
collection 262
global 257, 260
handle 260
local 257, 260
local vs. global 257
logging 260
register 340
runtime with layout skin tag 195
strategy 257
swallow 273
expensive 455
expose 73
externalize SQL 405

 
F

Façade Pattern 392
factory
DAO 402
Hibernate 384
JDBC 418
<message-resource> 419
resource bundle 418
static 402
XSLT transformer 369
Factory Pattern 392
<field> 283
file
transfer 89
upload 90
File Upload 89
limiting file sizes 95
tag attributes 94
FileInputStream 72
filter
and bean write tag 114–115
bean write tag – false 115
bean write tag – HTML/XML 115
bean write tag – true 114
best practices 115
finally 400
findForward 306
fine-grained 364, 378
fine-grained protection 346
flat-file authentication 323
flexibility 394
form beans
exposed with bean resource tag 146
exposing to page 140
format
custom 63
dates 63
numbers 63
time 63
formatter tag 443
FormFile 91
formset inheritance 315
<formset> 313
forward
attribute in layout tab tag 232
locale 305
frames and MVC 98
frameworks
hallmark 339
persistence 391
FrontBase 379
functionality
and logic present tag 127

 
G

garbage collection 456
garbage collector 357
generic error page 258
getContextPath and html rewrite tag 148
getDynaClass 445
getResource 71
getVariableInfo 85
global 328
global exception 268
global forwards
and html rewrite tag 151
exposed by bean resource tag 146
exposing to page 140
global queue 45
globalize 298
Globals.ERROR 62
Globals.ERROR_KEY 45, 47, 62
Globals.LOCALE_KEY 296–297, 303, 305, 311, 315
Globals.MESSAGE_KEY 62
good practice 52
gotcha 56, 69, 79, 94, 301,316, 342, 345, 353, 357, 417, 460
JavaScript and selected row 205
Graphic User Interfaces
no equivalent Struts tags and HTML 151
GRASP principles 276
green screen 455
group security 343
guaranteed navigation 406
GUI
altering look with logic present tag 127
and logic equal tag 136
and panels 187
and Struts-Layout tags 175
crumbs, best practices 224
debugging with logic present tag 130
exposing WEB-INF elemnts in 147
finding variables in development 130
migrating to tiles 163
simple table with Struts-Layout 178
tools for Struts-Layout 182
using logic equal tag 136
using logic present tag 133
guideline 49
message tags 49

 
H

hard-coding 303
hardwired 47
harvest 79
HashMap, used to pass parameters 151
hbg.xml file 382
header 47, 57
heavy load 459
hexadecimal 89
Hibernate 378
alias 389
artifacts 379
close session 384
commit 391
definition 378
environmental information 383
example 379
exceptions 390
factory 379, 385, 400
factory cache 384
factory close 385
features 391
<generator> 382
hidden 394
<id> 382
implementation specific features 383
job 382
key generation 382
map columns 382
performance 384
primary key 389
replacement parameter 389
search 389
selecting objects 389
Struts Action 387
transform 391
update 391
ways to search 389
Hibernate Query Language 378
Hibernate SQL 389
hibernate.cfg.xml
classpath 383
hidden field 416
high cohesion 276
high-traffic sites and images 112
high-volume sites 243
hijack, Action 342
hot spots 341–342
controller 339
definition 339
HQL 389
href, attribute in layout tab tag 232
HSQL 405
HTML 46
and layout panel tag 191
and skins 194
and tabbed panes 229
filtering in bean write tag 114
functionality with logic present tag 128
in beans 115
limitations 371
listing of rendered tabbed panes 227
validating complicated strings 115
view of complex table 186
with Struts tags instead of Struts-Layout 182
HTML table 80
alternate row colors 80
<html:errors/> 247, 261, 342
<html:errors> 44, 269
<html:image> 302
<html:img> 302
<html:javascript> 255
<html:messages> 44
HTTP
challenges 406
mechanism 16
stateless 406
unsecured protocol 330
HTTP 1.0 320
HTTP protocol 406
Http Request
get handle to session 154
HTTP session 378
volume 378
HTTP Status 400 337
HTTPS 321
https 334
HttpServletRequestSimulator 433
HttpSession 136, 153–154, 156
scope with bean define tag 119
serialized in appservers 153
HttpSessionSimulator 428
httpsPort property 332
Hypersonic 379
command 379
dialect 383
HypersonicSQL 379

 
I

IDE 379, 427
images 302, 417
and directory structure 111
limitations with Struts tags 112
size attributes and 113
IMAP 329
immutable 297, 356–357
include directive 123–125
compared with action 123
includes, different types discussed 125
in-container testing 428, 437–438, 444
popularity 438
increase 354, 373, 460, 468
increase load 460
increase performance 354
increased flexibility 54
incremental compile 379
information management 243
Informix 379
Ingres 379
inheritance 378
in-memory cache 398
input, clear 75
instrumenting 467
definition 462
integration 69
Interbase 379
interface, user 50
internationalization 44, 67
bulit-in support 301
maintenance 301
internationalize
steps 298
text 47
tiles 309
Internet Explorer 321
Internet Media Type 89
IOException, swallow 413
isRoles() 337
isUserInRole 341
iterate 46, 55
iterate tag, extend 80
IterateRowTei 85
iteration index number 84
iText 372, 376
download 372

 
J

Jakarta Project, an open source movement 2
JAR files for Struts-Layout tags 175
Java IO package 94
Java programmers
experienced 62
Java Server Pages, Cactus 438
Java Swing
compared with layout panel tag 188
similarities to tree in Struts-Layout 209
JavaBeans 64, 68, 368, 428
javadoc 69
java.lang.Exception 261
JavaScript 100, 105, 108, 122, 149–150, 177, 187, 193–195, 198–200,202, 204, 206–207, 210, 216, 252
alert 253
and html rewrite tag 149–150
and tabbed panes 229
and tree navigation 207
attributes in tree action 212
attributes used with tree navigation 215
in tree action 211
locating files with skins
problems 199
required files for Struts-Layout 177
selectable rows 202
tabbed pane reference 227
tabbed panes 225
validation, reuse 255
java.text.ChoiceFormat 67
java.text.MessageFormat 63
java.util.ArrayList and Struts-Layout 178
java.util.Collection
and dynamic crumbs 221
and Struts-Layout tags. See Struts-Layout tags
with layout pager tag 236
with Struts-Layout tags 173
java.util.Collections 120
and bean define tag 120
java.util.HashMap
with Struts Layout 183
JAXB 368, 371
jCoverage
common mistake 467
download 463
graphical representations 467
reports 466
stage-1 467
stage-2 467
statistical information 467
jcoverage.ser 467
JDBC 394, 396
properties 418
JDBCMessageResourcesFactory 418
JDK v 1.4 330
JMS 70, 72, 357
queue 70
JNDI 461
jsessionid 5, 16
and bookmarking 18
background 17
recipeJSESSIONID 16
JSP 32, 46–48, 52, 55, 59–61, 65, 68, 80, 88, 90, 98, 185, 188, 221, 239, 245–246, 299, 301, 304, 325, 334, 356, 361, 363, 366, 371–372, 375–376, 389, 394, 468
???error??? – message-resources 29
accessing message-resources 31
ActionForward 14
adding a skin tag 198
as framework 2
base tag placement 36
bean define code listing 120
bean define tag 116
bean resource tag 139
bean write tag nested in logic present tag 129
before tags 99
bundle attribute in tags 30–31
client-side validation 252
code using bean resource 145
constant variable on page 34
constants and MVC boundaries 34
CSS 38
different directories from CSS 37
DynaActionForms 41
dynamic tabs 232
errors with Struts-Layout tags 201
exposing struts-config to View 140
images 111
in team environments 148
include action 124
include compile time issues 123
include, difference between 123
includes compared 123
JavaScript and selected row 205
layout collectionItem tag 180
layout panel tag 188–189
linking stylesheets 37
linking stylesheets recipe explained 37
listing with layout panel tag 189
listing with tabbed panes 227
logic present tag 127
logic present tag listing 130
migrating to XML definitions 167
MVC1 97
page portability and tiles 162
pager tag implemented 236
parameters as constants 33
precompiled with Ant 7
public static final Strings
tree navigation 213
session attributes 154
skinned 174
static tree methods 208
Struts 2
tabbed panes 225
tag libraries 99
the View layer 97
Tiles 164
tiles definitions 164
tiles definitions, differences with XML 167
tree navigation 213
tree navigation listing 214
tricks using html rewrite tag 149
URL rewriting 18
usage of different 125
use in 15
using base tag 36
using constants in 35
using message tag 27–28
violating MVC in 103
without includes, simple 122
without Struts 2
xtags 140
JSP tag libraries
and business logic 100
by shawn bayern 101
JSP tags
server-side 100
works well with Struts 101
<jsp:useBean/>
and Struts-Layout tags 179
with Struts-Layout 185
JSSE download, install 330
JSTL 87, 115, 139–140, 296
and tag attributes 104
future vs Struts tags 104
in Struts-EL 104
option for Struts 2
overlap with Struts' tag library 104
Shawn Bayern 103
JTree, similarities with Struts Layout tree 215
judgment 405
JUnit
Ant 427
assertions 427
automated build 427
automatically run 427
build tests 427
description 427
execute 427
fail 427
install 436
reports 436
runners 427
JUnitPerf 461
definition 456

 
K

key
attribute and tabbed panes 226
attribute for layout pagerStatus tag 240
knowledge 65
known key 406

 
L

language code 300
language variances 301
lastSelRow, JavaScript attribute and selected row 205
layered application 391
layers 393
benefits 393, 404
exceptions 398
golden rule 397
Hibernate 393
illustrate 393
Struts 393
use 404
Layers pattern 392
layout.pager.next.img
skin with pager 233
layout.pager.next.label
skin with pager 233
layout.pager.previous.img
skin with pager 233
layout.pager.previous.label
skin with pager 233
lazy load 423
hybrid 423
LDAP 321, 329
Lego 394
LGPL 372
licenses 455
lightweight 319
limit 67
limitation 345, 347
line of defense 243
links 106, 110, 112, 124, 130, 148, 151–152
and migration to Struts 152
for js and CSS 149
Load Test 456
locale
forward 305
set 298
locale sensitive 67, 72
localize
country code 305
forward alternatives 309
images 302
locate information 80
lock 329
log out 326
<logger> 324
<logic:messagesPresent> 47, 55
look and feel tabbed panes 229
low coupling 271

 
M

maintainability 49, 392
vs development 171
maintainable 276, 305, 345, 405
maintenance 53, 275, 286, 330, 335, 343, 417, 449
and weak design 99
maintenance cycle 462
maintenance nightmare 462
malicious 320
manage complexity 455
manage content, business users 418
mask 73
maxPageItems, attribute for layout pager tag 236
Mckoi SQL 379
memory 301
MenuComponent and visitor pattern 216
MenuComponent.addComponent method in creating trees 213
menu.jar 175, 208
and tree navigation 208
MenuRepository and tree navigation 213
mergewebxml 441, 443
message queue 51, 53, 55–56, 70
global 65
MessageFormat 376
message-formatting 62
MessageResource 72, 93
MessageResourceFactory 419
message-resources 26–28, 30, 70, 72, 74
alternate 301
changes in Struts 1.1 25
default code listing 25
in struts-config file 26
listing in struts-config file 31
location in struts-config 27
modify for multiple resources 27
placement in struts-config file 28
<message-resources/> 249, 417
<message-resources> 299
messages
classification 62
formatting 63
groups 57
organize 62
property 53
render 48
method, HTTP request parameter 270
metrics 462
Microsoft SQL Server 379
migration 252
mismatch paradigm 378
mission statement 302
mock
HTTP request 428
HTTP response 428
HTTP session 428
Mock Object
useful 444
Mock Objects 426, 428, 433, 438
useful 428
MockStrutsTestCase 428, 432–434, 437, 439, 446
Model-View-Controller 393
with JSP 97, 102
modify output 67
modularity 345
module testing 454
ModuleConfig 355, 384–385
modules 355, 426, 449–451, 454
available documentation 24
caveats 26
changing names 23
creating 21
creating separate 20–21
deciding to merge 20
default application 452
interconnectivity 450
invoking actions in other modules 23
messages and struts-config 31
multiple resource bundles 21
number of resources allowed 26
principal objective 450
problems connecting resource bundles 28
recipe explained 19
reference 28, 31
referring outside of context 23
resource bundles 25
separate directories 21
sharing resources 21
testing. See testing
various Jakarta modules 2
with multiple resources 27
monolithic 417
MPL 372
multi-language 298
multipart/form-data 89
multiple facades 394
MVC 46, 49, 171, 393
ActionForward with 14
and Smalltalk-80 97
and Struts 97
and Struts logic tags 99
in Struts context 2
loose definitions 99
Struts separation 3
violations 98
MySQL 379

 
N

name, attribute in layout collection tag 185
namespace 80
navigation 406
and 218
strategies, best practices 207
tabbed panes 225
trees 206
using tabs, best practices 225
when to use trees 206
NavigationTokenUtils 413
navigation.xml 408
nocache attribute 409
noncache attribute 417
non-scalable 460
non-SSL links 330
null values
best practice 138
empty tag 128
present tag 128
number of last displayed item
arg for layout pager 239
NumberUtils 286

 
O

Object
in session or parameter 132
typing with bean define tag 119
object model 378
Object-Oriented Design 392
Object-Relational Mappers 378, 391
Objects, relationships in tree navigation 213
onclick, JavaScript attribute in tree navigation 215
onglet, prefix and tabbed panes 230
ongletMiddle, attribute and tabbed panes 229
ongletSpace, attribute and tabbed panes 228
ongletTextDis, attribute and tabbed panes 228
ongletTextEna, attribute and tabbed panes 228
onRowClick
and Struts-Layout 187
JavaScript and selected row 206
onRowDoubleClick, and Struts-Layout 187
onRowSelect, JavaScript and selected row 206
onSubmit 253
OOD 392
OptimizeIt 461
Oracle 379
ordinality 63
organize 80
Orion 438, 443
outside-the-container testing 438
over design 405
override, locale 305

 
P

page, attribute in layout tab tag 232
pageContext 107–108, 117, 124, 130, 149
pageKey 303
attribute 111
pager
tag implemented inside JSP 233
tag. See Struts-Layout tags
pageScheme 335
panels and tabbed panes 226
parameter attribute
and logic present tag 131
parameter markers, ways to replace 63
parameter replacement 63
parent-child relationships
in tree navigation 215
password 320
pattern
Data Access Object 392
Façade 392
Factory 392
Layers 392
Separation of Concerns 393
pattern-mappings 326
PDF 371
attachment 376
browser 372
ContentLength 376
ContentType 376
create 372
flush 376
Headers 376
pops up 376
programmatic functionality 377
PdfWriter 375
performance 72, 335, 352, 378
fixing problems 455
Hibernate 384
objectives 418
reflection 273
testing. See testing
Tiles controller 364
vs MVC 171
performance development practices 460
performance expectations 460
performance experience 461
performance plan 461
scope 455
performance problem detection 461
performance requirements 455
performance test plan 460
benefits 455
definition 455
performance testing
build process 460
define 460
delay 455
effective approach 455
goals 460
popular 460
types 455
performance testing.
See also testing
performance tuning 405
PerformaSure 461
persist 73
file 91
persistence
time 378
persistence exceptions
generic 400
persistence layer 393
change 398
responsibilities 393, 397
persistence services 378
PHP 158
physical space 455
picture 302
planning 62
plug-in 30, 195–196, 281, 332, 352, 356–357, 386, 389, 426
cache Hibernate resoruces 400
clobbering 357
configuration 243
create Hibernate 385
custom skin 196
example 354
Hibernate 378–379, 384
implementation steps 354
implementing 353
in Struts modules 24
interface 353
life-cycle 353
message-resources placed after 27
message-resources plug-in 25
register 356
SSL 332
validator 312
<plug-in> 385
plurals 69
gender specific 69
Pointbase 379
POJO 405
policy 319
polymorphism 378
pool 357
port 331
portability 377
Portable Document Format.
See PDF
portals and panels 187
postal codes 313
post-conditions 450
Postgre 418
PostgreSQL 379
Pot-au-feu, recipe 171
pragmatism 405
pre-conditions 450
prefix 272
presentation
reason for using Struts-Layout 173
with logic equal tag 135
presentation layer 393
coupling 391
responsibilities 393
preserve resources 400
private fields 346
problems with crumbs 223
processActionForward 341
processException 340–341
processing events 82
processorClass 342, 409
placed before message-resources 27
processRoles 339, 341
production scenario 444
productivity 275–276
user 62
productivity tool 256
progress 379
project lifecycle 455
project plan 426
proof of concept 49
Property Files
See also Resource Bundles
property files 299
and tabbed panes 226
attribute in layout collectionItem tag 186
internationalization 300
of layout skins 200
tree navigation settings 215
property files. See Resource Bundles
protect 95, 357, 393, 398
areas 343
fields 346
protect fields
techniques 347
protocol 334
prototypes 391
proxy redirector, cactus 438
purge 73

 
Q

quality 49
queue name
choose 56
prefix 56
queue, delete 55

 
R

random number 90
read-only objects 357
realm 324
reduce complexity 395
reduce effort 426
refactor 280, 377, 429, 462
Refactoring
and migrating to Struts 148
reflection 273, 356, 378, 404
DispatchAction 270
JUnit 427
regression tests 462
regular expressions 247, 252, 312
relational paradigm 378
relationship, queue name and field 52
release resources 353
rench 69
repetitive 44
replacement marker 63
repopulate the cache 357
request parameter and tree navigation 209
RequestProcessor 246, 336–339, 342, 408–410, 412, 416
create 341
default 336
extend 339
locale 296
processActionPerform 412
processForward 412
processInclude 413
processPath 412
processPreprocess 412
reset 75
reset method 298
Resin 438, 443
resource bundles 44, 46, 51
and tabbed panes 226
declare 418
internationalize 298
resources
cache 353
load 353–354
response.EncodeURL
and html rewrite tag 148
Response-Time-Under-Load 456
responsiveness 455
reuse 345, 367
deny 391
risk 56
road signs 302
roadmap 75
robust 323, 327, 345, 405
roles 325–326, 328, 337
add 342–343, 346
list 336
omission 336
register 336, 340
validate 337
runtime 69

 
S

sanity checks 269
SAP DB 379
saveErrors 47, 51
saveMessages 48, 54
scalable 460
scale 343
scope request 47
scope attribute, best practices in tags 119
scripting variable 55, 59, 81
from context attribute 118
using bean define (simple) 118
scriptlets 44
search
automatic 46
terminates 302
search sequence 301–302
secure 349
Secure Socket Layer 321, 329
security 319
browser 320
business logic 320
databases 320
enterprise 320
flat file 320
group 343
hole 326
limitations 337
policy 319
role 320
Struts limitations 338
toolbox 347
security access, fine-grained 347
security mechanism 336–338, 347
proprietary 342
security model 319
custom 328
security risk 286
security role 343
security strategies 319
security violations 337
detection 338, 342
SecurityRequestProcessor
register 340
SecurityViolationException 339–341
selectedTabKeyName attribute in layout tabs tag 232
separate directories, tiles and definitions 162
Separation of Concerns 393
serializable 292
Server Error 500 261
servlet 353
destroy state 353
initialization state 353
remove 353
service state 353
specification 353
Servlet Container 296, 321
and tiles 168
loading skin resources 196
Orion 3
Resin 3
Tomcat 3
servlet context 402
Servlet Filters 438
Servlet Lifecycle 353
Servlet specification 320
Servlet specification 2.3 338
session and crumbs 221
session attributes
method to remove all 155
remove attributes 154
session object 406
setAltImage, tree navigation attribute 216
setImage, tree navigation attribute 216
setLocation, tree navigation attribute 216
setOnClick, tree navigation attribute 216
setTitle, tree navigation attribute 216
setup() 433, 439, 460
shopping basket 406
shopping carts 349, 406
and logic equal tag 135
simple 44
single point of entry
and MVC 99
size 93
skinResources
attributes 200
property in plug-in 196
skins
and crumbs 223
and tree navigation 209
applications with Struts-Layout 194
browser view of skin in tree 215
introduced as concept 174
socket 423
solve performance problems 460
sort 57
/sort.do
action with layout pager tag 238
default mapping needed for layout pager 238
invoked with pager tag 239
sort.token.required and sorting 201
spoof 336–337, 406
SQL 419
client 419
srcKey 303, 417
SSL 321, 329, 335
Action 329, 333
basics 329
convert 329
definition 329
enable 330
secure page 332
submit 334
Tomcat 330
SSL HTTP request 330
SSL HTTP/1.1 Connector 331
SSL links 330
format 330
switch 330
ssl-ext 329
install 331
sslext
namespace 335
taglib 334
sslext.jar 332
stack trace, eliminating with tags 130
startup 44, 64
stateful session bean 406
static crumbs, limited appeal 218
static factory 402
storage medium 378
strategies 336
navigation best practices 207
strength 63
StringTokenizer 84, 415
Struts
associating CSS to JSPs Associate Style Sheets 37
directory structure 165
DynaActionForms 38
managing constants 32
migrating from legacy JSP 148
multiple message-resources 27
multiple modules 19
safe integration 3
specify a resource file 25
tags using "title" element 29
what it doesn't do 3
Struts 1.1 49, 51, 248, 256, 261, 339
Struts Action and HttpServletRequest 153
Struts Forms
associate errors to fields 50
display errors, messages 44
message groups, creating 57
message queues, custom 53
message replacement parameters 62
message resources from action 69
wizard, create 73
Struts HTML tag library
ability to resolve and encode paths 109
Struts in Action 2
Struts messaging, ways to use 44
Struts tag library
and rtexprvalue 104
bean, define 113, 116
best practices 121
coding practices 121
from field 118
java.util.Collection 120
name attribute 117
setting type and scope attributes 119
usage 116
value attribute 117
with pager tag 236
bean, include 102
different from action or directive 122
setting forward attribute 124
bean, message 4, 26
bean, resource 102
attributes 138
code listing 145
usefulness of 146
bean, write 114
filter false 115
bundle attribute, using 28
define, attributes 116
html
base 36
baseStrutsHtmlRewrite 35
define 102
img 102
img limitations 112
img, example 111
link 102, 106
link, Related tags 108
link, URL string without 106
rewrite 102, 108, 148–149, 152
rewrite, first tag to use 148
rewrite, use when migrating 151
rewrite, uses 149
rewrite, various ways of using 151
write 102
logic
empty with logic present tag 133
equal 102
equal settings 137
iterate 120
iterate, substitution for Struts layout 182
notEqual 135
notEqual settings 137
notPresent 132
notPresent, code listing 131
present 102
present functionality explained 128
present uses 127
present, code listing 131
present, developing with, 133
present, test for null 138
redirect 18
logic, iterate similarities to layout pager tag 233
MVC Separation 97
not try/catch/finally best practice 129
peudo try/catch block in JSP 134
Struts with AntStrutsAndAnt 6
struts-bean tags and tabbed panes 225
<struts-config> 299
struts-config.xml 25, 27, 29, 70, 73–74, 94–95
and Struts-Layout default actions 177
and tile mappings 159
application.properties file 25
breaking into modules 20
calling an XML tile definition from Action 167
configure for tree navigation 208
DynaActionForms 39
linking CSS 37
locating message-resources 27
maintenance with ActionForward 16
master vs module files 21
message-resources mapping 25
modify for multiple resources 27
module restrictions 24
multiple configurations 5
multiple message-resources 29
param value 22
placement of message-resources node 28
simple XML Form Beans 38
synchronicity 19
tiles plug-in 159, 165
unlimited resource files 26
using ActionForward 14
welcome page and jsessionid 17
with bean resource tags 138
with simple includes 126
without modules 19
Struts-EL 103–104
and scripting variables 104
explained 104
Struts-Layout tag library 170
Struts-Layout tags
completing installation 177
create a dynamic table (complex table) with selectable rows 202
create a dynamic table (complex table), pager reference 236
Creating a navigation tree 206
Creating bread crumb trails 217
Creating tabbed panes 224
extendable 187
layout
collection 173, 179, 181, 203–204, 237
attributes populated 185
JavaScript and selected row 206
selectable rows 202
with paging 233
collectionItem 173, 179, 181, 185, 203–204, 237
selectable rows 202
with paging 233
crumbs 218, 220
html 195, 226
drawbacks 195
pager 173, 237
position with layout pagerStatus tag 240
pagerStatus 239
where to position 240
panel 189, 226
and tiles 192
listing 188
title 190
skin 194, 214
and layout html tag 195
tree navigation 213
tabs 225–226, 230
attributes 230–231
listing 226
treeview 198, 208
Pager tag use 233
project explained 175
running 199
Selectable Rows in table 201
tree navigation 213
under continuous development 173
with 203
struts-logic tags
and tabbed panes 225
relativity to tabs 232
StrutsTestCase 426–428, 436–440, 443–445, 449–450, 454, 456–461, 463, 465–468
ActionErrors 437
ActionMessages 437
actionPerform 428
ActionServlet 428, 437
automation 428
classpath 443
definition 427
how to use 428
JUnit 428
migration 439
outside the container 426
simulators 428
struts-config.xml
inside classpath 433
outside classpath 433
style sheet 193–194, 227, 365, 370
and layout panel tag 190
linked with 38
using tabbed panes with 226
styleClass
attribute for layout pager tag 236
attribute for layout panel tag 190
attribute in layout collection tag 185
attribute with skins 199
JavaScript and selected row 205
stylesheet 193–194, 370
successful 80
SwitchAction 23
code 23
listing 23
Sybase 379
synchronize 357
synchronized collection 357
system errors 256
SystemException 257

 
T

tabbed panes
and Struts-Layout 225
creating 225
simple implementation of 226
source from browser 228
<table/>
and layout panel tag 191
tabs
browser view 230
creating 225
listing in Struts-Layout 226
navigation, best parctices 225
rendered source listing 227
wire diagram showing relationships 229
tabular data 80
tag 302
Tag Libraries
as 100
life cycle of 100
TagExtraInfo 82
taglib 81, 332
taglib uri, sample for layout tags 176
tamper 329
TCP/IP 329
<td/> and layout panel tag 191
teardown() 433, 439, 460
test bed 462
test strategy 450
testing 352
acceptance 427
ActionServlet simulation 433
challenge 455
coverage 426
determine cases 431
DynaActionForms 426
gray area conditions 432
importance 437
in-container vs outside-the-container 438
integration 427, 450
interfaces 454
modules 426, 449
guidelines 450
interfaces 454
negative 428
performance 426–427
positive 428
regression 427
test performance 438
unit 427
unit test scope 431
unsuccessful 434
view 450
TestMethodFactory 457
testXXX() 439
text messages, informational 44
text rearrange 63
text/html 368–369
text-less images 302
<th/> and layout panel tag 191
third-party JAR 87
throughput test 456
tiles 297, 309–312, 328, 343–345, 358–360, 362–364
and directory structure 162
and encapsulation 161
and MVC 99
and Struts actions 166
and tabbed panes 225
battle with logic tags 103
best practices 163
definition 310
extending 312
feature 311
internationalize 309
JSP to XML definitions 164
more uses 164
snippets of code 161
template 159
when to use 163
XML vs. JSP definitions 167
Tiles controller
Action 362
best use 364
Class 359
create 358
declare 362
performance 364
pros and cons 358
register 359
rule of thumb 364
type decision 364
types 358
types contrast 363
Tiles XML definitions
capabilites 168
tiles-defs.xml 164, 167, 358
plug-in to struts-config.xml 142
Timed Test 456
title
attribute and layout panel tag 188
attribute in layout collectionItem tag 203
titleKey 303
TLD 86
Struts-Layout tags 176
to 417
token, store 416
Tomcat 322, 324, 329, 335–336, 338, 342–343, 345, 347, 365, 438–440
authentication 320
in-container testing 438
related to jsessionid 19
set up SSL 330
SSL 330
SSL test 331
temporary version 443
TopLink 394, 404
total number of pages
arg for layout pager 239
transaction 73, 384
transform XML 365
transform XML to HTML 365
transparent 89
tree
browser view of 215
configuring layout tags for 208
Java listing to create 209
navigarion with 206
Trees
and Struts-Layout tags 177
treeview
action and Struts-Layout 208
opening and closing tree 209
TreeviewAction
default method for Struts-Layout 208
tried-and-true 44
type attribute, best practices in tags 119
typesafe enumeration 55

 
U

unauthorized access 319
action mapping 336
unescaped contents 46
unique key constraint 400
unique token 406
unit test
definition 427
reduce effort 427
universal 321
unordered list 47
unpredictable results 69
unSelect, JavaScript and selected row 205
uploading 90
files with Struts 89
size 93
URI scheme 333
URL
adding JavaScript with html rewrite tags 149
and html rewrite tag 151
and images 112
QueryString with crumbs 223
rewriting with html rewrite tags 148
URL request string using HashMap to pass parameters 150
URL rewriting inside jsessionid 17
URL scheme definition 330
<url-pattern> 326
user friendly 80
user interface 329
utility class 72

 
V

valid token 407
validate method 298
override 271, 316
validate() 243
validateEmail 250
validating tokens 413
validation 57, 243–245, 249–253, 256, 262, 269, 271, 273, 275, 277, 282–283, 289, 292, 295, 312–316, 393, 396, 406–407, 409
arguments 251
basic 243
bypass 286
client-side 247, 252
cross-form validation 287
custom 252, 255
depends 250
dispatch 271, 273
driver license number 287
duplicate 280
DynaForms 251
error message 289
form 298
form bean 246
alternatives 247
use 247
internationalize 251
lightweight 244
locale 313
localize 313
mask 312
minimum 250
msg 250
object oriented 248
range 312
required 249
reuse 244
rules 282
scenarios 315
server-side 247
services 289
simple 251
simple server-side 243
Struts 244
turn off wizard validation 283
wizard 244, 282
wizard alternatives 286
validation rules 313
find 313
library 292
maintainable 276
validation-rules.xml 243, 247
sample 249
validation.xml 243, 247, 312
purpose 249
Validator 243, 247, 252,277, 282, 287, 297, 313, 316, 358
benefits 251
concatenate constants 279
constants 244, 276
how to use 278
replacements 276
custom 287, 292
formset constants 276
global constants 276
internationalize 312
locale sensitivity 315
logical name 288
multiple constants 279
pluggable 287
configure 288
validation-rules 288
wizard support 282
Validator constants
override 276
ValidatorActionForm 243, 284, 290, 312
ValidatorForm 243, 283, 290, 312
subclass 284
validator-rules.xml
JavaScript 252
validators
basic 312
gotcha 316
plug-in 312
variant not supported 306
Vector 182, 234, 357
of Maps, for selectable rows 202
with Struts-Layout 183
Velocity 366, 372, 377
VeriSign 321
View
and bean resource tag 145
and logic equal tag 136
and MVC (Tiles) 158
beware of sending unfiltered information 115
capturing errors with logic tags 129
include components 122
role of logic in 97
visit()
method 216
Visitor Pattern, in tree navigation 216
visual 80
visual cues 80, 87

 
W

WAR file
Ant target 10
attaching to email with Ant 12
built w/Ant script 7
changing name with Ant 12
create automatically 7
create manually 6
default application.properties file 25
explained 6
in build.xml 7
location after Ant build 12
manual creation 6
purging during Ant build 10
source files 6
to target location 7
with Ant recipe 6
wart 49
weakness 63
Web Services 365, 423
WEB-INF
adding struts-tiles.tld 159
directory, additions for Struts-Layout 176
tiles-definitions.xml 164
xtags tld file 139
<web-resource-collection/> 326
web.xml 87, 175, 436, 441, 443
altering for modules 21
code listing for modules 22
defining 16
excluding in Ant build 10
listing with ActionForward 14
modified tag 15
modifying for Struts-Layout tags 175
module parameters 23
no direct use of ActionForward 15
registered modules 23
registering multiple struts-config modules 21
resource bundle pointer 25
welcome-file-list 15
width attribute
and layout collectionItem tag 180
and layout tabs tag 226
for layout pagerStatus tag 240
in tab(s) tags 230
Winterfeldt, David 248
wire diagram of tabbed panes 229
Wizard 73
multi-form 293
wizards 57, 78
and crumbs 218
multi-form 73
single-form 73
understand 74
workload 50
wrapper 404

 
X

Xalan 365, 371
XML 50, 312, 345, 364–365, 368–371, 408, 415–416, 423, 466
and modules 21
changes to struts-config vs code 37
configuration 243
configuration file 413
formatting in bean
write tag 114
message resources and modules 26
message-resource node of struts-config 28
migrating to XML definitions 167
parse 415
strings to JSP 115
Strings with bean write tag 115
struts-config key attribute 30
Tiles and MVC 99
tiles definitions
and MVC 103
differences with JSP 167
rapid development 168
transformation 371
validation best practice 21
XML-based Tiles, best practice 169
XML/XSLT concepts 365
XPath 365
XSL 115, 139–140, 142, 145, 147, 281
and bean resource 145
and bean resource tag 147
and xtags 139
generate HTTP response 365
how to use 370
load stylesheet 369
match attribute 370
namespace 370
stylesheet 368
XSL stylesheets 357
<xsl:apply-templates /> 370
<xsl:template> 370
XSL-FO 365, 371
XSLT 365, 370–371
commands 369
JSP vs Action 371
processor 365
Struts 365
transformation tools 365
xtags 139–140, 145
and bean resource tag 147
and JSTL 139
configuration 140
configuring 139

 
Z

zip codes 313