Learn Java for Web Development

(Tina Meador) #1

loose coupling, 158
need for, 159
separation of concerns, 158
platform
description, 4
goals, 5
multitier architecture (see Multitiered
Java EE architecture)
servlet
EL (see Expression Language (EL))
first JSP, 108
first servlet, 107
JSP, 107
JSP standard action and Expression
Language, 108
JSTL (see JSP Standard Tag Library
(JSTL))
presentation(view) vs. business(servlet)
code, 107–108
scriptlet, 108
static web pages, 4
web tier evolution, 106
Java enterprise application
definition, 7
layers in, 8
Java Runtime Environment (JRE), 12
JavaScript Object Notation (JSON), 39
JavaServer Faces (JSF), 263
arichecture, 264
converter, 267
event and event listeners, 267
FacesServlet, 264
managed beans, 264
renderer, 266
UI component framework, 266
validator, 267
view declaration language (VDL), 265
bookstore application, 288
directory structure, 289
Spring framework, 290
Spring JDBCTemplate, 291
templates, 293
UI application andJSF EL, 294
facelets (see Facelets)
library
composite, 265
facelets, 265


HTML components, 265
JSF core, 265
life cycle
phases, 278–279
well-defined phases, 277
managed bean, 281
Spring JDBCTemplate, 288
web page creation, 268
directory structure, 272, 277
dynamic web projet, 269
form.xhtml, 273–274
hello.xhtml, 273–274
JSF capabilities, 272
library function, 270
managed bean, 273, 275
web modules, 269
web.xml, 276
Java server pages (JSP)
declarations, 78
expressions, 79
hello( ) method, 79
implicit objects
application object, 80
config object, 81
exception object, 81
out object, 81
pageContext, 81
page object, 81
request object, 81
response object, 81
session object, 81
usages, 82
directives
include directive, 77
page directive, 76
page directive attributes, 76
taglib directive, 78
scope objects, 80
getAttribute method, 79
setAttribute method, 79
scriptlets, 79
standard action
forward action, 83–84
getProperty, 85
include action, 82–83
setProperty, 85
usebean, 85

Index 441
Free download pdf