Murach's Java Servlets and JSP (2nd Edition)
How to structure a web application with the MVC pattern

This chapter shows how to use the MVC pattern to structure a web application to take advantage of the best features of servlets and JSPs.

Chapter 7 How to structure a web application with the MVC pattern
The Email List application 202
The code for the servlet 202
The code for the JSP 204
Two architectures for web applications 206
The Model 1 architecture 206
The Model-View-Controller (MVC) pattern 208
How to forward and redirect requests and responses 210
How to get and set request attributes 210
How to forward requests 212
How to redirect responses 212
How to validate data 214
A use JAvaScript to validate data on the client 214
How to use a servlet to validate data on the server 218
How to include a file in a JSP 224
A JSP that includes a header and footer file 224
Two techniques for including files in a JSP 228
How to use the web.xml file 230
Basic techniques for working with a web.xml file 230
How to work with initialization parameters 232
How to implement custom error handling 236
t




Murach's Java Servlets and JSP

Learn more about this book

View the table of contents

Add this book to your cart