Murach's Java Servlets and JSP

This chapter shows how to use the Model 2 architecture (also known as the MVC pattern) to structure a web application to take advantage of the best features of servlets and JSPs.

Chapter 6 How to structure a web application
The Email List application 168
The code for the servlet 168
The code for the JSP 170
How to structure servlets and JSPs 172
An introduction to the Model 1 architecture 172
An introduction to the Model-View-Controller pattern 174
How to forward and redirect requests and responses 176
How to validate data on the client 178
An HTML page that uses JavaScript to validate data 178
A dialog box that displays a validation message 180
How to validate data on the server 182
A servlet that validates data 182
A JSP that displays a data validation message 184
How to include code from a file in a JSP 186
A JSP that includes code from other files 186
How to include a file in a JSP 188
How to work with the web.xml file 190
An introduction to the web.xml file 190
How to set initialization parameters 192
How to get initialization parameters 194
How to implement servlet mapping 196
How to implement custom error handling 198
t




Murach's Java Servlets and JSP

Learn more about this book

Add this book to your cart