Learn Java for Web Development

(Tina Meador) #1

serverTme, 244
servlet-context.xml file, 242
servlet parameter, 246
session status, 254
spring configuration files, 245
Spring MVC-based project, 235
string object, 244
tcServer, 236
template project, 233
triggers, 254
VMware, 235
WebDataBinder, 253
web request, 253
web.xml file, 240, 245
XML header, 240
zip archive, 232
architecture
DispatcherServlet, 227, 230
SpringMVC components, 231
WebApplicationContext, 228
working principle, 227–228
Stand-Alone Bookstore Java App, 33–34
Static scaffolding
book class, 329
BookController, 330
command, 329
controller actions, 331
Grails view
create, 340
edit, 343
list, 339
show, 341
view layer, 337
redirect( ) method, 332
render( ) method calling
rendering view, 332
textual response, 331
returning model
create( ) action, 334
delete( ) action, 337
edit( ) action, 335
index( ) action, 333
list( ) action, 333
save( ) action, 334
show( ) action, 335
update( ) action, 336


Static typing, 2
Static web pages, 4
String interpolation, 405
Struts
ActionServlet, central component, 162
architecture, 162
early history, 161
one-to-one mapping, 163
origin of Struts 2, 161
sequence of events, 163
Tiles framework, 161
vs. Struts 2, 163
Struts. See Struts 2 web framework
Struts 2 web framework
Action interface, 165
ActionSupport class, 166
architecture, 162–164
bookstore application (see Bookstore
application)
early history of Struts, 161
history, 161
interceptors
action declaration, 167
default stack declaration, 168
mapping interceptors to action, 167
key features, 161–162
Maven, 169, 214
actionPackages Init Parameter, 183
archetype parameters
specification, 172–173
archetypes selection, 172
build process, 170
directory structure of HelloWorld
project, 179
empty deployment descriptor, 175
hello.jsp, 181
HelloWorldAction, 182
HelloWorldAction.java, 180
HelloWorld application execution, 177
HelloWorld project, Struts 2
annotations, 181
HelloWorld project with welcome
message, 177–178
index.jsp, 176–177, 179
new project creation, 170
non-Maven-based application, 174
pom.xml, 175

446 Index


Spring Web MVC (cont.)

Free download pdf