You are previewing Sun™ Certification Training Guide (310-080): Java™ 2 Enterprise Edition (J2EE™) Web Component Developer Exam.
O'Reilly logo
Sun™ Certification Training Guide (310-080): Java™ 2 Enterprise Edition (J2EE™) Web Component Developer Exam

Book Description

The authoritative solution to passing the 310-080 exam!

  • Alain Trottier is a well respected authority in the Java community.

  • Training Guides are the most effective self-study guides in the marketplace, featuring exam tips, study strategies, review exercises, case studies, practice exams, ExamGear testing software, and more

  • Each Training Guide is subjected to rigorous technical review by a team of industry experts, ensuring content is superior in both coverage and technical accuracy.

  • Table of Contents

    1. Copyright
      1. Dedication
    2. CramSession Approved Study Material
      1. About CramSession.com
    3. Preface
    4. About the Author
    5. About the Technical Reviewers
    6. Acknowledgments
    7. We Want to Hear from You!
    8. How to Use This Book
      1. Chapter Opener
      2. Instructional Features Within the Chapter
      3. Extensive Review and Self-test Options
    9. Introduction
      1. Who Should Read This Book
      2. Getting Started
      3. How to Use This Book
      4. How This Book Helps You
      5. Conventions Used in This Book
      6. The Book's Web Site
      7. Que Publishing
    10. I. Becoming a Sun Certified J2EE Web Component Developer
      1. 1. The Java Web Component Developer for J2EE Platform Exam
        1. Introduction
        2. Certification Benefits
        3. Certification Roadmap
        4. Exam Information
        5. What the Exam Covers
          1. Section 1—The Servlet Model
          2. Section 2—The Structure and Deployment of Modern Servlet Web Applications
          3. Section 3—The Servlet Container Model
          4. Section 4—Designing and Developing Servlets to Handle Server-side Exceptions
          5. Section 5—Designing and Developing Servlets Using Session Management
          6. Section 6—Designing and Developing Secure Web Applications
          7. Section 7—Designing and Developing Thread-safe Servlets
          8. Section 8—The JavaServer Pages (JSP) Technology Model
          9. Section 9—Designing and Developing Reusable Web Components
          10. Section 10—Designing and Developing JSP Pages Using JavaBean Components
          11. Section 11—Designing and Developing JSP Pages Using Custom Tags
          12. Section 12—Designing and Developing a Custom Tag Library
          13. Section 13—Design Patterns
        6. How the Exam Is Given
        7. Exam Preparation
        8. How to Take the Exam
        9. Coding Style
          1. Files
          2. Comments
          3. Breaking Lines
          4. Opening and Closing Curly Braces
          5. if, if-else, if else-if else, and switch Statements
          6. Naming Conventions
        10. Specifications
        11. Courses
        12. Chapter Summary
          1. Suggested Readings and Resources
      2. 2. Exam Preparation Strategy
        1. Introduction
        2. Prepare for the Exam with a Plan
        3. Chapter Summary
          1. Suggested Readings and Resources
      3. 3. JSP and Servlet Overview
        1. Introduction
        2. The Servlet Story
        3. Servlet and JSP History
        4. Web Servers and Servlet Containers
        5. JSP
        6. Chapter Summary
        7. Apply Your Knowledge
          1. Review Questions
            1. Suggested Readings and Resources
      4. 4. Servlet Container Model
        1. Introduction
        2. Overriding HttpServlet GET, POST, and PUT Methods
          1. GET
          2. POST
          3. PUT
        3. Triggering HttpServlet GET, POST, and PUT Methods
          1. GET
          2. POST
          3. HEAD
        4. Interfacing with HTML Requests
          1. Form Parameters
          2. Retrieving a Servlet Initialization Parameter
          3. Retrieving HTTP Request Header Information
          4. Acquiring a Binary Stream for the Response
          5. Redirecting an HTTP Request to Another URL
        5. Web Application Scope
          1. Request
          2. Session
          3. Context
        6. Servlet Life-cycle
        7. Using a RequestDispatcher
        8. Web Application Context
        9. Context Within a Distributable Web Application
        10. Chapter Summary
        11. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      5. 5. Servlet Exceptions
        1. Introduction
        2. Returning an Error Code to the Client
          1. sendError Method
          2. setStatus Method
        3. WebApp Log
        4. Chapter Summary
        5. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      6. 6. Session Management
        1. Introduction
        2. Sharing State Information Between Requests
        3. Using Session Objects
          1. Storing and Retrieving Session Objects
          2. Event Listeners
          3. Invalidating Sessions
          4. Session Tracking Through a URL Rather Than a Cookie
        4. Chapter Summary
        5. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      7. 7. JavaServer Pages (JSP) Technology Model
        1. Introduction
        2. Opening and Closing JSP Tags
          1. Directive
            1. include Directive
            2. taglib Directive
            3. page Directive
          2. Declaration
          3. Scriptlet
          4. Expression
        3. The Purpose of JSP Tags
        4. JSP Tags as XML
        5. The Page Directive
          1. Importing Classes
          2. Declare That a JSP Page Exists Within a Session
          3. Declare That a JSP Page Uses an Error Page
          4. Declare That a JSP Page Is an Error Page
          5. language
          6. extends
          7. buffer
          8. autoFlush
          9. isThreadSafe
          10. info
          11. contentType
        6. JSP Page Lifecycle
        7. JSP Implicit Objects
          1. request
          2. response
          3. session
          4. config
          5. application
          6. pageContext
          7. page
          8. out
        8. JSP Scriptlets
        9. Chapter Summary
        10. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      8. 8. Extend JSP with JavaBeans
        1. Introduction
        2. Creating JavaBeans
          1. jsp:useBean
          2. Getting and Setting Properties
            1. jsp:setProperty Action
            2. jsp:getProperty Action
        3. Scope of JavaBeans in JSP
          1. Page
          2. Request
          3. Session
          4. Application
        4. How to Access JavaBeans in JSP
        5. Chapter Summary
        6. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      9. 9. Customize JSP with Tag Libraries
        1. Introduction
        2. Creating a Tag Library Example
          1. Defining a Tag Library in web.xml
        3. Taglib Directive
        4. Custom Tag
        5. Tag Library Descriptor
        6. Custom Tag Body
        7. Tag Event Method
        8. Custom Tag Handler
        9. Using Outer-Inner Custom Tags
        10. Chapter Summary
        11. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      10. 10. Deploying Web Applications and Components
        1. Introduction
        2. Web Application and Web Archive Structure
        3. Deployment Descriptor Elements
          1. context-param
            1. Element
            2. Example
          2. listener
            1. Element
            2. Example
          3. servlet
            1. Element
            2. Example
          4. servlet-mapping
            1. Element
            2. Example
          5. session-config
            1. Element
            2. Example
          6. welcome-file
            1. Element
            2. Example
          7. error-page
            1. Element
            2. Example
          8. taglib
            1. Element
            2. Example
          9. security-constraint
            1. Element
            2. Example
          10. login-config
            1. Element
            2. Example
          11. security-role
            1. Element
            2. Example
          12. Web Application Descriptor Example
        4. Web Application Exceptions
        5. Web Application Security
        6. Authentication Types
        7. Chapter Summary
        8. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
      11. 11. Design Patterns
        1. Introduction
        2. Design Patterns Defined
        3. Design Pattern Elements
        4. Patterns on the Exam
          1. Value Object
            1. Is
            2. Is Not
            3. Analogy
            4. Problem
            5. Responsibility
            6. Intent [or Goals and Constraints]
            7. Primary Activity
            8. Context
            9. Motivation or Forces
            10. Applicability
            11. Solution
            12. Consequences
            13. Known Uses
            14. Related Patterns
            15. References
          2. Data Access Object
            1. Is
            2. Is Not
            3. Analogy
            4. Problem
            5. Responsibility
            6. Intent [or Goals and Constraints]
            7. Primary Activity
            8. Context
            9. Motivation or Forces
            10. Applicability
            11. Solution
            12. Consequences
            13. Known Uses
            14. Related Patterns
            15. References
          3. Business Delegate
            1. Is
            2. Is Not
            3. Analogy
            4. Problem
            5. Responsibility
            6. Intent [or Goals and Constraints]
            7. Primary Activity
            8. Context
            9. Motivation or Forces
            10. Applicability
            11. Solution
            12. Consequences
            13. Known Uses
            14. Related Patterns
            15. References
          4. Model-View-Controller (MVC)
            1. Is
            2. Is Not
            3. Analogy
            4. Problem
            5. Responsibility
            6. Intent [or Goals and Constraints]
            7. Primary Activity
            8. Context
            9. Motivation or Forces
            10. Applicability
            11. Solution
            12. Consequences
            13. Known Uses
            14. Related Patterns
            15. References
          5. Front Controller
            1. Is
            2. Is Not
            3. Analogy
            4. Problem
            5. Responsibility
            6. Intent [or Goals and Constraints]
            7. Primary Activity
            8. Context
            9. Motivation or Forces
            10. Applicability
            11. Solution
            12. Consequences
            13. Known Uses
            14. Related Patterns
            15. References
        5. Patterns Beyond the Exam
          1. Sample Pattern
            1. Name
            2. Summary
            3. Is
            4. Is Not
            5. Analogy
            6. Problem
            7. Responsibility
            8. Intent [or Goals and Constraints]
            9. Primary Activity
            10. Context
            11. Motivation or Forces
            12. Applicability
            13. Solution
            14. Consequences
            15. Known Uses
            16. Synonyms
            17. Glossary
            18. Related Patterns
            19. References
        6. Chapter Summary
        7. Apply Your Knowledge
          1. Review Questions
          2. Exam Questions
            1. Suggested Readings and Resources
    11. II. Final Review
      1. Fast Facts 310-080
        1. Becoming a Sun Certified Web Component Developer
        2. Chapter 3, “JSP and Servlet Overview”
        3. Chapter 4, “Servlet Container Model”
        4. Chapter 5, “Servlet Exceptions”
        5. Chapter 6, “Session Management”
        6. Chapter 7, “JavaServer Pages (JSP) Technology Model”
        7. Chapter 8, “Extend JSP with JavaBeans”
        8. Chapter 9, “Customize JSP with Tag Libraries”
        9. Chapter 10, “Deploying Web Applications and Components”
        10. Chapter 11, “Design Patterns”
      2. Study and Exam Prep Tips
        1. Learning as a Process
        2. Study Tips
          1. Study Strategies
            1. Macro and Micro Study Strategies
            2. Active Study Strategies
            3. Common Sense Strategies
          2. Pre-Testing Yourself
        3. Exam Prep Tips
          1. Putting It All Together
            1. More Pre-Exam Prep Tips
            2. During the Exam Session
      3. Practice Exam 1
        1. Exam Questions
      4. Practice Exam 2
        1. Exam Questions
      5. Practice Exam 3
        1. Exam Questions
    12. III. Appendixes
      1. A. Servlet API Snapshot
        1. Introduction
        2. Overview of the Servlet API
        3. The javax.servlet Package
          1. Interfaces
          2. Classes
          3. Exceptions
        4. Understanding the javax.servlet Package Interfaces, Classes, and Exceptions
          1. Interfaces
            1. RequestDispatcher
            2. Servlet
            3. ServletConfig
            4. ServletContext
            5. ServletContextAttributeListener
            6. ServletContextListener
            7. ServletRequest
            8. ServletResponse
            9. SingleThreadModel
          2. Classes
            1. GenericServlet
            2. ServletContextAttributeEvent
            3. ServletContextEvent
            4. ServletInputStream
            5. ServletOutputStream
            6. ServletRequestWrapper
            7. ServletResponseWrapper
          3. Exceptions
            1. ServletException
            2. UnavailableException
        5. The javax.servlet.http Package
          1. Interfaces
          2. Classes
        6. Understanding the javax.servlet.http Package Interfaces and Classes
          1. Interfaces
            1. HttpServletRequest
            2. HttpServletResponse
            3. HttpSession
            4. HttpSessionActivationListener
            5. HttpSessionAttributeListener
            6. HttpSessionBindingListener
            7. HttpSessionContext
            8. HttpSessionListener
          2. Classes
            1. Cookie
            2. HttpServlet
            3. HttpServletRequestWrapper
            4. HttpServletResponseWrapper
            5. HttpSessionBindingEvent
            6. HttpSessionEvent
        7. Summary
          1. Suggested Readings and Resources
      2. B. JSP Syntax
        1. Syntax Rules
        2. Format Conventions
        3. HTML or Output Comment
          1. JSP Syntax
          2. XML Syntax
          3. Example
        4. Hidden Comment
          1. JSP Syntax
          2. XML Syntax
          3. Example
        5. Declaration
          1. JSP Syntax
          2. XML Syntax
          3. Example
        6. Expression
          1. JSP Syntax
          2. XML Syntax
          3. Example
        7. Scriptlet
          1. JSP Syntax
          2. XML Syntax
          3. Example
        8. Include Directive
          1. JSP Syntax
          2. XML Syntax
          3. Example
        9. Page Directive
          1. JSP Syntax
          2. XML Syntax
          3. Example
        10. Taglib Directive
          1. JSP Syntax
          2. XML Syntax
          3. Example
        11. <jsp:text>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        12. <jsp:include>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        13. <jsp:plugin>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        14. <jsp:useBean>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        15. <jsp:setProperty>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        16. <jsp:forward>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        17. <jsp:getProperty>
          1. JSP Syntax
          2. XML Syntax
          3. Example
        18. Summary
          1. Suggested Readings and Resources
      3. C. Resources
        1. References
        2. Reference List
        3. Summary
      4. D. Setting Up a Servlet Environment
        1. Selecting an Application Server
        2. Obtaining and Installing Tomcat
          1. Obtaining Tomcat
          2. Installing Tomcat
            1. Starting Tomcat
          3. Testing Tomcat
          4. Stopping Tomcat
          5. Changing the Port
        3. Summary
          1. Suggested Readings and Resources
      5. E. What's on the CD-ROM
        1. PrepLogic Practice Tests, Preview Edition
        2. Exclusive Electronic Version of Text
      6. F. Using the PrepLogic Practice Tests, Preview Edition Software
        1. Exam Simulation
          1. Question Quality
          2. Interface Design
          3. Effective Learning Environment
        2. Software Requirements
          1. Installing PrepLogic Practice Tests, Preview Edition
          2. Removing PrepLogic Practice Tests, Preview Edition from Your Computer
        3. Using PrepLogic Practice Tests, Preview Edition
          1. Starting a Practice Test Mode Session
          2. Starting a Flash Review Mode Session
          3. Standard PrepLogic Practice Tests, Preview Edition Options
          4. Time Remaining
          5. Your Examination Score Report
          6. Review Your Exam
          7. Get More Exams
        4. Contacting PrepLogic
          1. Customer Service
          2. Product Suggestions and Comments
        5. License Agreement