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. The accompanying CD features PrepLogic™ Practice Tests, Preview Edition. This product includes one complete PrepLogic Practice Test with approximately the same number of questions found on the actual vendor exam. Each question contains full, detailed explanations of the correct and incorrect answers. The engine offers two study modes, Practice Test and Flash Review, full exam customization, and a detailed score report.This ebook does not include the CD that accompanies the print edition. Java 2 Enterprise Edition (J2EE) Web Component Developer Exam Cram 2......Page 2 Copyright © 2003 by Que Certification......Page 3 A Note from Series Editor Ed Tittel......Page 4 Contents at a Glance......Page 6 Table of Contents......Page 8 About the Author......Page 14 About the Technical Reviewer......Page 15 We Want to Hear from You!......Page 18 The Sun Java Technology Professional Program......Page 19 About This Book......Page 22 How to Use This Book......Page 24 Que Publishing......Page 25 Self-Assessment......Page 26 The Ideal Web Component Developer Certification Candidate......Page 27 I Think I’m Ready, So What’s Next?......Page 31 CHAPTER 1 Servlet Methods and Life Cycle......Page 32 JSP and Servlet Overview......Page 34 Handling HTTP GET, POST, and PUT Requests......Page 38 Servlet Objects and Scope......Page 44 Servlet Life Cycle......Page 48 Using a RequestDispatcher......Page 49 Event Listeners......Page 50 Practice Questions......Page 53 Need to Know More?......Page 57 CHAPTER 2 Deploying Web Applications......Page 58 Web Application Overview......Page 59 Deployment Descriptor......Page 62 Practice Questions......Page 75 Need to Know More?......Page 82 CHAPTER 3 The Servlet Container......Page 84 Context Architecture......Page 85 Context-Initialization Parameters......Page 87 Using Listeners......Page 88 Context and Attributes within a Distributable......Page 93 Practice Questions......Page 95 Need to Know More?......Page 99 CHAPTER 4 Servlet Exceptions......Page 100 Handling Server-Side Exceptions......Page 102 Return an HTTP Error Using sendError......Page 103 Return an HTTP Error Using setStatus......Page 104 Exception Handling in the Deployment Descriptor......Page 105 Using a RequestDispatcher to Forward to an Error Page......Page 106 Practice Questions......Page 108 Need to Know More?......Page 112 CHAPTER 5 Session Management......Page 114 Session Management Overview......Page 115 Session Methods......Page 116 Invalidating Sessions......Page 119 Practice Questions......Page 122 Need to Know More?......Page 125 CHAPTER 6 Web Application Security......Page 126 Web Application Security Overview......Page 127 Deployment Descriptor Security Elements......Page 131 Security Concepts......Page 135 Authentication Types......Page 136 Practice Questions......Page 139 Need to Know More?......Page 146 CHAPTER 7 Thread-Safe Servlets......Page 148 Servlet Threads......Page 149 Object Scope Affects Thread Safety......Page 151 Practice Questions......Page 154 Need to Know More?......Page 158 CHAPTER 8 JavaServer Pages (JSP)......Page 160 JavaServer Pages Introduction......Page 161 JSP Life Cycle......Page 166 JSP Syntax......Page 167 Directive......Page 169 JSP Implicit Objects......Page 173 Declaration......Page 176 Using XML to Create JSP Actions......Page 177 Practice Questions......Page 179 Need to Know More?......Page 183 CHAPTER 9 JSP and JavaBeans......Page 184 JavaBean Overview......Page 185 jsp:useBean......Page 189 jsp:setProperty Action......Page 191 Scope of JavaBeans in JSP......Page 193 Accessing JavaBeans with Scriptlets......Page 195 Practice Questions......Page 197 Need to Know More?......Page 201 CHAPTER 10 Custom Tag Libraries......Page 202 Custom Tag Library Overview......Page 203 taglib Directive......Page 207 Tag Handler......Page 208 Custom Tag Body......Page 211 Tag Library Descriptor......Page 212 Accessing JSP Objects from the Custom Tag Handler......Page 213 Returning a Tag Handler from a Method......Page 214 Practice Questions......Page 216 Need to Know More?......Page 221 CHAPTER 11 Design Patterns......Page 222 Servlet Design Patterns......Page 223 Patterns on the Exam......Page 224 Practice Questions......Page 231 Need to Know More?......Page 234 CHAPTER 12 Sample Test......Page 236 CHAPTER 13 Answer Key......Page 260 APPENDIX A Servlet API Snapshot......Page 280 Overview of the Servlet API......Page 281 Understanding the javax.servlet Package Interfaces, Classes, and Exceptions......Page 282 The javax.servlet.http Package......Page 287 Summary......Page 291 APPENDIX B JSP Syntax Snapshot......Page 292 Syntax Rules......Page 293 Syntax Explanations and Examples......Page 294 Suggested Readings and Resources......Page 306 APPENDIX C Resources......Page 308 References......Page 309 Reference List......Page 310 Summary......Page 316 APPENDIX D What’s on the CD-ROM......Page 318 APPENDIX E Using the PrepLogic Practice Tests, Preview Edition Software......Page 322 Glossary......Page 330 Index......Page 338 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. The accompanying CD features PrepLogicTM Practice Tests, Preview Edition. This product includes one complete PrepLogic Practice Test with approximately the same number of questions found on the actual vendor exam. Each question contains full, detailed explanations of the correct and incorrect answers. The engine offers two study modes, Practice Test and Flash Review, full exam customization, and a detailed score report.This ebook does not include the CD that accompanies the print edition.
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.
A guide to the certification exam for Sun Certified Programmers for Java 2 Platform who are using servlet and Java Server Pages (JSP) APIs to develop Web applications using the Java 2 Platform, Enterprise Edition. This book assumes that you have a solid foundation of knowledge but can use a refresher on important concepts.