Sei sulla pagina 1di 5

SCWCD 5.

0 Book - Head First Servlets and JSP (HFSJ)


Buy this book from Amazon store

1.intro and overview


Section 1.1. OBJECTIVES Section 1.2. What does your web server do? Section 1.3. Two-minute HTML guide Section 1.4. What is the HTTP protocol? Section 1.5. Anatomy of an HTTP POST request Section 1.6. URL. Whatever you do, don't pronounce it "Earl". Section 1.7. Web servers love serving static web pages Section 1.8. Servlets Demystified (write, deploy, run) Section 1.9. JSP is what happened when somebody introduced Java to HTML

2.High-level overview

Section 2.1. OBJECTIVES Section 2.2. What is a Container? Section 2.3. How it looks in code (what makes a servlet a servlet) Section 2.4. A servlet can have THREE names Section 2.5. Story: Bob Builds a Matchmaking Site Section 2.6. The Model-View-Controller (MVC) Design Pattern fixes this Section 2.7. A "working" Deployment Descriptor (DD) Section 2.8. How J2EE fits into all this

3.Hands-on MVC

Section 3.1. OBJECTIVES Section 3.2. Let's build a real (small) web application Section 3.3. Creating your development environment Section 3.4. The HTML for the initial form page Section 3.5. Deploying and testing the opening page Section 3.6. The first version of the controller servlet Section 3.7. Building and testing the model class Section 3.8. Enhancing the servlet to call the model, so that we can get REAL advice... Section 3.9. Create the JSP "view" that gives the advice Section 3.10. Enhancing the servlet to "call" the JSP (version three)

4.Request AND response

Section 4.1. OBJECTIVES Section 4.2. Servlets are controlled by the Container Section 4.3. Each request runs in a separate thread! Section 4.4. But a Servlet's REAL job is to handle requests. That's when a servlet's life has meaning. Section 4.5. The story of the non-idempotent request Section 4.6. What determines whether the browser sends a GET or POST request? Section 4.7. Sending and using a single parameter Section 4.8. So that's the Request... now let's see the Response Section 4.9. You can set response headers, you can add response headers Section 4.10. Servlet redirect makes the browser do the work Section 4.11. Review: HttpServletResponse

5.Attributes and listeners


Section 5.1. OBJECTIVES Section 5.2. Init Parameters to the rescue Section 5.3. How can a JSP get servlet init parameters? Section 5.4. Context init parameters to the rescue Section 5.5. ServletConfig is one per servlet ServletContext is one per web app Section 5.6. She wants a ServletContextListener Section 5.7. Tutorial: a simple ServletContextListener Section 5.8. Compile and deploy Section 5.9. The full story... Section 5.10. Listeners: not just for context events... Section 5.11. What, exactly, is an attribute? Section 5.12. Attribute API Section 5.13. Context scope isn't thread-safe! Section 5.14. The problem in slow motion... Section 5.15. Synchronizing the service method is a spectacularly BAD idea Section 5.16. Are Session attributes thread-safe? Section 5.17. SingleThreadModel is designed to protect instance variables Section 5.18. Only Request attributes and local variables are thread-safe! Section 5.19. Request attributes and Request dispatching

6.Session management

Section 6.1. OBJECTIVES Section 6.2. It's supposed to work like a REAL conversation... Section 6.3. The client needs a unique session ID Section 6.4. URL rewriting: something to fall back on Section 6.5. Getting rid of sessions Section 6.6. Can I use cookies for other things, or are they only for sessions? Section 6.7. Key milestones for an HttpSession Section 6.8. Don't forget about HttpSessionBindingListener

Section 6.9. Session migration Section 6.10. Listener examples

7.Using JSP

Section 7.1. OBJECTIVES Section 7.2. In the end, a JSP is just a servlet Section 7.3. But then Kim mentions "expressions" Section 7.4. Time to see the REAL generated servlet Section 7.5. The out variable isn't the only implicit object... Section 7.6. Lifecycle of a JSP Section 7.7. While we're on the subject... let's talk more about the three directives Section 7.8. Scriptlets considered harmful? Section 7.9. But wait... there's still another JSP element we haven't seen: actions

8.Scriptless JSP

Section 8.1. OBJECTIVES Section 8.2. Our MVC app depends on attributes Section 8.3. Deconstructing and Section 8.4. Can you make polymorphic bean references? Section 8.5. The param attribute to the rescue Section 8.6. Bean tags convert primitive properties automatically Section 8.7. Expression Language (EL) saves the day! Section 8.8. Using the dot (.) operator to access properties and map values Section 8.9. The [] gives you more options... Section 8.10. For beans and Maps you can use either operator Section 8.11. The EL implicit objects Section 8.12. Imagine you want your JSP to roll dice Section 8.13. Reusable template pieces Section 8.14. With , the buffer is cleared BEFORE the forward Section 8.15. She doesn't know about JSTL tags Section 8.16. Bean-related standard action review

9.Using JSTL

Section 9.1. OBJECTIVES Section 9.2. Looping without scripting Section 9.3. Section 9.4. Doing a conditional include with Section 9.5. Doing the same thing with Section 9.6. for all your hyperlink needs Section 9.7. What if the URL needs encoding? Section 9.8. Make your own error pages Section 9.9. The tag. Like try/catch...sort of

Section 9.10. What if you need a tag that's NOT in JSTL? Section 9.11. Pay attention to Section 9.12. The tag handler, the TLD, and the JSP Section 9.13. The taglib is just a name, not a location Section 9.14. When a JSP uses more than one tag library

10.Custom tag development


Section 10.1. OBJECTIVES Section 10.2. Tag Files: like include, only better Section 10.3. Where the Container looks for Tag Files Section 10.4. Making a Simple tag handler Section 10.5. A Simple tag with a body Section 10.6. What if the tag body uses an expression? Section 10.7. You still have to know about Classic tag handlers Section 10.8. A very small Classic tag handler Section 10.9. The Classic lifecycle depends on return values Section 10.10. IterationTag lets you repeat the body Section 10.11. Default return values from TagSupport Section 10.12. Didn't you know?!?!? The JSP spec provides an API just for this purpose. The DynamicAttribute interface is all you need. Section 10.13. With BodyTag, you get two new methods Section 10.14. What if you have tags that work together? Section 10.15. Using the PageContext API for tag handlers

11.Web app deployment


Section 11.1. OBJECTIVES Section 11.2. The Joy of Deployment Section 11.3. WAR files Section 11.4. How servlet mapping REALLY works Section 11.5. Configuring welcome files in the DD Section 11.6. Configuring error pages in the DD Section 11.7. Configuring servlet initialization in the DD Section 11.8. Making an XML-compliant JSP: a JSP Document

12.Web app security


Section 12.1. OBJECTIVES Section 12.2. The Big 4 in servlet security Section 12.3. A little security story Section 12.4. How to Authenticate in HTTP World: the beginning of a secure transaction Section 12.5. Top Ten Reasons to do your security declaratively Section 12.6. Who implements security in a web app? Section 12.7. Authentication revisited

Section 12.8. The FOUR authentication types Section 12.9. Securing data in transit: HTTPS to the rescue Section 12.10. How to implement data confidentiality and integrity sparingly and declaratively

13.Filters and wrappers


Section 13.1. OBJECTIVES Section 13.2. Building the request tracking filter Section 13.3. A filter's life cycle Section 13.4. Declaring and ordering filters Section 13.5. Compressing output with a response-side filter Section 13.6. Wrappers rock Section 13.7. The real compression filter code Section 13.8. Compression wrapper code

14.Patterns and struts


Section 14.1. OBJECTIVES Section 14.2. Web site hardware can get complicated Section 14.3. More design principles... Section 14.4. Patterns to support remote model components Section 14.5. How will they handle remote objects? Section 14.6. The "go-between" is a Business Delegate Section 14.7. Time for a Transfer Object? Section 14.8. Business tier patterns: quick review Section 14.9. Our very first pattern revisited... MVC Section 14.10. Yes! It's Struts in a nutshell Section 14.11. Refactoring the Beer app for Struts Section 14.12. Patterns review for the SCWCD

Potrebbero piacerti anche