You are previewing Java™ 2 Enterprise Edition (J2EE™) Web Component Developer Exam Cram™ 2 (Exam 310-080).
O'Reilly logo
Java™ 2 Enterprise Edition (J2EE™) Web Component Developer Exam Cram™ 2 (Exam 310-080)

Book Description

This certification is for Sun Certified Programmers for Java 2 Platform who are using servlet and JavaServer Pages (JSP) APIs to develop Web applications using the Java 2 Platform, Enterprise Edition (J2EE). The certification consists of one exam and requires Sun Certified Programmer for Java 2 Platform status. This book is not intended to teach new material. Instead it assumes that you have a solid foundation of knowledge but can use a refresher on important concepts as well as a guide to exam topics and objectives. This book focuses exactly on what you need to pass the exam - it features test-taking strategies, time-saving study tips, and a special Cram Sheet that includes tips, acronyms, and memory joggers not available anywhere else. The series is supported online at several Web sites: examcram.com, informit.com, and cramsession.com.

Table of Contents

  1. Copyright
    1. Dedication
  2. A Note from Series Editor Ed Tittel
  3. About the Author
  4. About the Technical Reviewer
  5. Acknowledgments
  6. We Want to Hear from You!
  7. Introduction
    1. The Sun Java Technology Professional Program
    2. About This Book
    3. Getting Started
    4. How to Use This Book
    5. The Book's Web Site
    6. Que Publishing
  8. Self-Assessment
    1. Java Web Applications in the Real World
    2. The Ideal Web Component Developer Certification Candidate
    3. I Think I'm Ready, So What's Next?
  9. 1. Servlet Methods and Life Cycle
    1. JSP and Servlet Overview
      1. Web Applications
    2. Handling HTTP GET, POST, and PUT Requests
      1. GET
      2. POST
      3. PUT
      4. HEAD
      5. Form Parameters
      6. Retrieving a Servlet Initialization Parameter
      7. Retrieving HTTP Request Header Information
      8. Acquiring a Text and Binary Stream for the Response
      9. Redirecting an HTTP Request to Another URL
    3. Servlet Objects and Scope
      1. Request
      2. Session
      3. Context
    4. Servlet Life Cycle
    5. Using a RequestDispatcher
    6. Event Listeners
    7. Practice Questions
    8. Need to Know More?
  10. 2. Deploying Web Applications
    1. Web Application Overview
    2. Deployment Descriptor
      1. context-param
        1. Example
      2. listener
        1. Example
      3. servlet
        1. Example
      4. servlet-mapping
        1. Example
      5. login-config
        1. Example
      6. error-page
        1. Example
      7. security-role
        1. Example
      8. security-constraint
        1. Example
      9. session-config
        1. Example
      10. taglib
        1. Example
    3. Practice Questions
    4. Need to Know More?
  11. 3. The Servlet Container
    1. Context Architecture
    2. Context-Initialization Parameters
    3. Using Listeners
    4. Context and Attributes within a Distributable
    5. Practice Questions
    6. Need to Know More?
  12. 4. Servlet Exceptions
    1. Handling Server-Side Exceptions
    2. Return an HTTP Error Using sendError
    3. Return an HTTP Error Using setStatus
    4. Exception Handling in the Deployment Descriptor
    5. Write a Message to the Web App Log
    6. Using a RequestDispatcher to Forward to an Error Page
    7. Practice Questions
    8. Need to Know More?
  13. 5. Session Management
    1. Session Management Overview
    2. Session Methods
      1. Event Listeners
    3. Invalidating Sessions
      1. Session Tracking Through a URL Rather Than a Cookie
    4. Practice Questions
    5. Need to Know More?
  14. 6. Web Application Security
    1. Web Application Security Overview
    2. Deployment Descriptor Security Elements
      1. servlet
        1. Example
      2. login-config
      3. security-role
      4. security-constraint
    3. Security Concepts
    4. Authentication Types
    5. Practice Questions
    6. Need to Know More?
  15. 7. Thread-Safe Servlets
    1. Servlet Threads
    2. Object Scope Affects Thread Safety
    3. Practice Questions
    4. Need to Know More?
  16. 8. JavaServer Pages (JSP)
    1. JavaServer Pages Introduction
    2. JSP Life Cycle
    3. JSP Syntax
    4. Directive
      1. include Directive
      2. taglib Directive
      3. page Directive
        1. Importing Classes
        2. Declare a Session
        3. Declare an Error Page
        4. language
        5. extends
        6. buffer
        7. autoFlush
        8. isThreadSafe
        9. info
        10. contentType
    5. Expression
    6. JSP Scriptlets
    7. JSP Implicit Objects
      1. request
      2. response
      3. session
      4. config
      5. application
      6. pageContext
      7. page
      8. out
    8. Declaration
    9. Using XML to Create JSP Actions
    10. Practice Questions
    11. Need to Know More?
  17. 9. JSP and JavaBeans
    1. JavaBean Overview
    2. jsp:useBean
    3. jsp:setProperty Action
    4. jsp:getProperty Action
    5. Scope of JavaBeans in JSP
      1. Page
      2. Request
      3. Session
      4. Application
    6. Accessing JavaBeans with Scriptlets
    7. Practice Questions
    8. Need to Know More?
  18. 10. Custom Tag Libraries
    1. Custom Tag Library Overview
    2. taglib Directive
    3. Custom Tag
    4. Tag Handler
    5. Custom Tag Body
    6. Tag Library Descriptor
    7. Accessing JSP Objects from the Custom Tag Handler
    8. Returning a Tag Handler from a Method
    9. Practice Questions
    10. Need to Know More?
  19. 11. Design Patterns
    1. Servlet Design Patterns
    2. Patterns on the Exam
      1. Value Object
        1. Benefits and Gotchas
        2. Purpose
        3. Solution
        4. Reference
      2. Data Access Object
        1. Benefits and Gotchas
        2. Purpose
        3. Solution
        4. Reference
      3. Business Delegate
        1. Benefits and Gotchas
        2. Purpose
        3. Solution
        4. Reference
      4. Model-View-Controller
        1. Benefits and Gotchas
        2. Purpose
        3. Solution
        4. Reference
      5. Front Controller
        1. Benefits and Gotchas
        2. Solution
        3. References
    3. Practice Questions
    4. Need to Know More?
  20. 12. Sample Test
  21. 13. Answer Key
  22. A. Servlet API Snapshot
    1. Overview of the Servlet API
    2. 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. ServletRequestWrapper
        5. ServletResponseWrapper
      3. Exceptions
        1. ServletException
    3. The javax.servlet.http Package
      1. Interfaces
        1. HttpServletRequest
        2. HttpServletResponse
        3. HttpSession
        4. HttpSessionActivationListener
        5. HttpSessionAttributeListener
        6. HttpSessionBindingListener
        7. HttpSessionListener
      2. Classes
        1. Cookie
        2. HttpServlet
        3. HttpServletRequestWrapper
        4. HttpServletResponseWrapper
        5. HttpSessionBindingEvent
        6. HttpSessionEvent
    4. Summary
  23. B. JSP Syntax Snapshot
    1. Syntax Rules
    2. Format Conventions
    3. Syntax Explanations and Examples
      1. HTML or Output Comment
        1. JSP Syntax
        2. XML Syntax
        3. Example
      2. Hidden Comment
        1. JSP Syntax
        2. XML Syntax
        3. Example
      3. Declaration
        1. JSP Syntax
        2. XML Syntax
        3. Example
      4. Expression
        1. JSP Syntax
        2. XML Syntax
        3. Example
      5. Scriptlet
        1. JSP Syntax
        2. XML Syntax
        3. Example
      6. include Directive
        1. JSP Syntax
        2. XML Syntax
        3. Example
      7. page Directive
        1. JSP Syntax
        2. XML Syntax
        3. Example
      8. taglib Directive
        1. JSP Syntax
        2. XML Syntax
        3. Example
      9. <jsp:text>
        1. JSP Syntax
        2. XML Syntax
        3. Example
      10. <jsp:include>
        1. JSP Syntax
        2. XML Syntax
        3. Example
      11. <jsp:plugin>
        1. JSP Syntax
        2. XML Syntax
        3. Example
      12. <jsp:useBean>
        1. JSP Syntax
        2. XML Syntax
        3. Example
      13. <jsp:setProperty>
        1. JSP Syntax
        2. XML Syntax
        3. Example
      14. <jsp:forward>
        1. JSP Syntax
        2. XML Syntax
        3. Example
      15. <jsp:getProperty>
        1. JSP Syntax
        2. XML Syntax
        3. Example
    4. Summary
    5. Suggested Readings and Resources
  24. C. Resources
    1. References
    2. Reference List
    3. Summary
  25. D. What's on the CD-ROM
    1. PrepLogic Practice Tests, Preview Edition
    2. Exclusive Electronic Version of Text
    3. Easy Access to Online Pointers and References
  26. E. Using the PrepLogic Practice Tests, Preview Edition Software
    1. Exam Simulation
    2. Question Quality
    3. Interface Design
    4. Effective Learning Environment
    5. Software Requirements
    6. Installing PrepLogic Practice Tests, Preview Edition
    7. Removing PrepLogic Practice Tests, Preview Edition from Your Computer
    8. Using PrepLogic Practice Tests, Preview Edition
    9. Starting a Practice Test Mode Session
    10. Starting a Flash Review Mode Session
    11. Standard PrepLogic Practice Tests, Preview Edition Options
    12. Time Remaining
    13. Your Examination Score Report
    14. Review Your Exam
    15. Get More Exams
    16. Contacting PrepLogic
    17. Customer Service
    18. Product Suggestions and Comments
    19. License Agreement
  27. Glossary