Home

This Chapter
-Introduction
-Why Servlets Are Not Dead
-The Problems with Model 1
-Model 2
-The Benefits of Struts
-Overview of the Chapters
-Code Download
-Other Resources

Table of Contents
-Introduction
-Chapter 1: Model 2 and Struts
-Chapter 2: Input Validation with Action Forms
-Chapter 3: The HTML Tag Library
-Chapter 4: Input Validation and Data Conversion
-Chapter 5: The Validator Plugin
-Chapter 6: The Expression Language
-Chapter 7: JSTL
-Chapter 8: The Bean Tag Library
-Chapter 9: The Logic Tag Library
-Chapter 10: Struts-EL, Nested, selectLabel
-Chapter 11: Message Handling and Internationalization
-Chapter 12: The Tiles Framework
-Chapter 13: Securing Struts Applications
-Chapter 14: The Config Object
-Chapter 15: The Persistence Layer
-Chapter 16: Object Caching
-Chapter 17: File Upload and File Download
-Chapter 18: Paging and Sorting
-Chapter 19: Preventing Double Submits
-Chapter 20: Early HttpSession Invalidation
-Chapter 21: Decorating Request Objects
-Chapter 22: How Struts Works

Previous
Next

 

Why Servlets Are Not Dead

With the advent of JSP, many people thought that was the end of the day for servlets. It turned out this was not the case. JSP did not displace servlets. In fact, in today’s real-world applications, both servlets and JSPs are used together. To understand why servlets did not become obsolete after the arrival of JSP, you need to understand the two design models upon which you can build your Java Web applications.

The first design model, simply called Model 1, was born right after the JSP was made available. Servlets are not normally used in this model. Navigating from one JSP to another is done by clicking the link in the page. The second design model is named Model 2. You will see shortly why Model 1 is not recommended and why Model 2 is the way to go.

Previous
Next