|
SCWCD Exam Study Kit Java Web Component Developer Certification Hanumant Deshmukh and Jignesh Malavia 2002 | 560 pages Includes CDROM ISBN: 1930110596 |
|||
| $44.95 | Softbound print book | Out of print (?) | |
| $22.50 | PDF ebook | Out of print (?) | |
Table of Contents
preface xvii
about this book xx
taking the exam xxiii
about the authors xxv
acknowledgments xxvi
about the cover illustration xxviii
- Part 1 Getting started 1
- 1 Understanding Java servlets 3
- 1.1 What is a servlet? 3
- Server responsibilities 3 F Server extensions 4
- 1.2 What is a servlet container? 5
- The big picture 5 F Understanding servlet containers 6 F Using Tomcat 7
- 1.3 Hello World servlet 8
- Code 8 F Compilation 9 F Deployment 9 F Execution 9
- 1.4 The relationship between a servlet container and the Servlet API 9
- The javax.servlet package 10 F The javax.servlet.http package 11 F Advantages and disadvantages of the Servlet API 12
- 1.5 Summary 12
- 2 Understanding JavaServer Pages 14
- 2.1 What is a JSP page? 14
- Server-side includes 15
- 2.2 Hello User 15
- The HTML code 15 F The servlet code 16 F The JSP code 16
- 2.3 Servlet or JSP? 17
- 2.4 JSP architecture models 17
- The Model 1 architecture 17 F The Model 2 architecture 18
- 2.5 A note about JSP syntax 19
- 2.6 Summary 20
- 3 Web application and HTTP basics 21
- 3.1 What is a web application? 22
- Active and passive resources 22 F Web applications and the web application server 22
- 3.2 Understanding the HTTP protocol 23
- HTTP basics 24 F The structure of an HTTP request 24 F The structure of an HTTP response 26
- 3.3 Summary 27
- Part 2 Servlets 29
- 4 The Servlet model 31
- 4.1 Sending requests: Web browsers and HTTP methods 32
- Comparing HTTP methods 33
- 4.2 Handling HTTP requests in an HttpServlet 34
- 4.3 Analyzing the request 36
- Understanding ServletRequest 36 F Understanding HttpServletRequest 37
- 4.4 Sending the response 39
- Understanding ServletResponse 39 F Understanding HttpServletResponse 42
- 4.5 Servlet life cycle 45
- Loading and instantiating a servlet 45 F Initializing a servlet 46 F Servicing client requests 47 F Destroying a servlet 47 F Unloading a servlet 47 F Servlet state transition from the servlet containerís perspective 47
- 4.6 ServletConfig: a closer look 49
- ServletConfig methods 49 F Example: a servlet and its deployment descriptor 50
- 4.7 ServletContext: a closer look 52
- 4.8 Beyond servlet basics 54
- Sharing the data (attribute scopes) 55 F Coordinating servlets using RequestDispatcher 56 F Putting it all together: A simple banking application 58
- 4.9 Summary 61
- 4.10 Review questions 62
- 5 Structure and deployment 66
- 5.1 Directory structure of a web application 67
- Understanding the document root directory 68 F Understanding the WEB-INF directory 68 F The web archive (WAR) file 69 F The default web application 69
- 5.2 The deployment descriptor: an overview 70
- Example: A simple deployment descriptor 71 F Using the <servlet> element 72 F Using the <servlet-mapping> element 73 F Mapping a URL to a servlet 74
- 5.3 Summary 78
- 5.4 Review questions 78
- 6 The servlet container model 81
- 6.1 Initializing ServletContext 82
- 6.2 Understanding application events and listeners 83
- javax.servlet.ServletContextListener 84 F javax.servlet.ServletContextAttributeListener 85 F javax.servlet.http.HttpSessionAttributeListener 86
- 6.3 Configuring a web application 86
- 6.4 Web applications in a distributed environment 88
- Behavior of a ServletContext 89 F Behavior of an HttpSession 90
- 6.5 Summary 90
- 6.6 Review questions 91
- 7 Handling server-side exceptions 94
- 7.1 Handling exceptions programmatically 95
- Handling business logic exceptions 97
- 7.2 Handling exceptions declaratively 99
- Using declarative exception handling 99 F Using servlets and JSP pages as exception handlers 101
- 7.3 Using RequestDispatcher to handle exceptions 105
- Handling exceptions thrown by RequestDispatcher 106
- 7.4 Logging 107
- 7.5 Summary 108
- 7.6 Review questions 109
- 8 Session management 113
- 8.1 Understanding state and sessions 114
- 8.2 Using HttpSession 115
- Working with an HttpSession 116 F Handling session events with listener interfaces 118 F Expunging a session 123
- 8.3 Understanding session timeout 124
- 8.4 Implementing session support 125
- Supporting sessions using cookies 126 F Supporting sessions using URL rewriting 127
- 8.5 Summary 129
- 8.6 Review questions 130
- 9 Developing secure web applications 133
- 9.1 Basic concepts 134
- Authentication 134 F Authorization 134 F Data integrity 135 F Confidentiality or data privacy 135 F Auditing 135 F Malicious code 135 F Web site attacks 135
- 9.2 Understanding authentication mechanisms 136
- HTTP Basic authentication 137 F HTTP Digest authentication 139 F HTTPS Client authentication 139 F FORM-based authentication 139 F Defining authentication mechanisms for web applications 140
- 9.3 Securing web applications declaratively 142
- display-name 143 F web-resource-collection 143 F auth-constraint 144 F user-data-constraint 145 F Putting it all together 145
- 9.4 Securing web applications programmatically 149
- 9.5 Summary 151
- 9.6 Review questions 152
- 10 Developing thread-safe servlets 156
- 10.1 Understanding the multithreaded servlet model 157
- 10.2 Understanding the single-threaded model 159
- The javax.servlet.SingleThreadModel interface 160
- 10.3 Variable scopes and thread safety 162
- Local variables 163 F Instance variables 164 F Class (or static) variables 166
- 10.4 Attribute scopes and thread safety 166
- Context scope 167 F Session scope 168 F Request scope 170
- 10.5 Summary 170
- 10.6 Review questions 171
- Part 3 Java Server Pages 173
- 11 The JSP technology modelóthe basics 175
- 11.1 JSP syntax elements 176
- Directives 177 F Declarations 178 F Scriptlets 179 F Expressions 180 F Actions 181 F Comments 182
- 11.2 The JSP page life cycle 184
- JSP pages are servlets 184 F Understanding translation units 184 F JSP life-cycle phases 184 F JSP life-cycle example 188
- 11.3 Understanding JSP page directive attributes 191
- The import attribute 192 F The session attribute 192 F The errorPage and isErrorPage attributes 192 F The language and extends attributes 194 F The buffer and autoFlush attributes 194 F The isThreadSafe attribute 194 F The info attribute 196 F The contentType and pageEncoding attributes 196
- 11.4 Summary 197
- 11.5 Review questions 198
- 12 The JSP technology modelóadvanced topics 200
- 12.1 Understanding the translation process 201
- Using scripting elements 202 F Using conditional and iterative statements 203 F Using request-time attribute expressions 206 F Using escape sequences 206
- 12.2 Understanding JSP implicit variables and JSP implicit objects 210
- application 212 F session 212 F request and response 213 F page 214 F pageContext 214 F out 215 F config 216 F exception 217
- 12.3 Understanding JSP page scopes 218
- Application scope 219 F Session scope 219 F Request scope 220 F Page scope 221
- 12.4 JSP pages as XML documents 223
- The root element 224 F Directives and scripting elements 225 F Text, comments, and actions 225
- 12.5 Summary 227
- 12.6 Review questions 227
- 13 Reusable web components 231
- 13.1 Static inclusion 232
- Accessing variables from the included page 233 F Implications of static inclusion 234
- 13.2 Dynamic inclusion 234
- Using jsp:include 235 F Using jsp:forward 236 F Passing parameters to dynamically included components 237 F Sharing objects with dynamically included components 239
- 13.3 Summary 243
- 13.4 Review questions 244
- 14 Using JavaBeans 248
- 14.1 JavaBeans: a brief overview 249
- JavaBeans from the JSP perspective 249 F The JavaBean advantage 250 F Serialized JavaBeans 252
- 14.2 Using JavaBeans with JSP actions 255
- Declaring JavaBeans using <jsp:useBean> 255 F Mutating properties using <jsp:setProperty> 263 F Accessing properties using <jsp:getProperty> 266
- 14.3 JavaBeans in servlets 268
- 14.4 Accessing JavaBeans from scripting elements 271
- 14.5 More about properties in JavaBeans 273
- Using non-string data type properties 273 F Using indexed properties 275
- 14.6 Summary 277
- 14.7 Review questions 278
- 15 Using custom tags 282
- 15.1 Getting started 283
- New terms 283 F Understanding tag libraries 284
- 15.2 Informing the JSP engine about a custom tag library 285
- Location of a TLD file 286 F Associating URIs with TLD file locations 287 F Understanding explicit mapping 287 F Resolving URIs to TLD file locations 288 F Understanding the prefix 290
- 15.3 Using custom tags in JSP pages 290
- Empty tags 291 F Tags with attributes 292 F Tags with JSP code 293 F Tags with nested custom tags 294
- 15.4 Summary 295
- 15.5 Review questions 295
- 16 Developing custom tag libraries 298
- 16.1 Understanding the tag library descriptor 300
- The <taglib> element 301 F The <tag> element 303 F The <attribute> element 304 F The <body-content> element 306
- 16.2 The Tag Extension API 308
- 16.3 Implementing the Tag interface 310
- Understanding the methods of the Tag interface 311 F An empty tag that prints HTML text 314 F An empty tag that accepts an attribute 316 F A non-empty tag that includes its body content 317
- 16.4 Implementing the IterationTag interface 319
- Understanding the IterationTag methods 319 F A simple iterative tag 321
- 16.5 Implementing the BodyTag interface 323
- Understanding the methods of BodyTag 323 F A tag that processes its body 324
- 16.6 Extending TagSupport and BodyTagSupport 327
- The TagSupport class 328 F The BodyTagSupport class 328 F Accessing implicit objects 329 F Writing cooperative tags 332
- 16.7 Whatís more? 337
- 16.8 Summary 338
- 16.9 Review questions 339
- Part 4 Patterns and filters 343
- 17 Design patterns 345
- 17.1 Design patterns: a brief history 346
- The civil engineering patterns 346 F The Gang of Four patterns 346 F The distributed design patterns 348 F The J2EE patterns 349
- 17.2 Patterns for the SCWCD exam 352
- The pattern template 352 F Value Object 354 F Model-View-Controller (MVC) 358 F Data Access Object (DAO) 360 F Business Delegate 364 F Front Controller 368 F Putting it all together 371
- 17.3 Summary 373
- 17.4 Review questions 373
- 18 Using filters 376
- 18.1 What is a filter? 377
- How filtering works 378 F Uses of filters 379 F The Hello World filter 379
- 18.2 The Filter API 381
- The Filter interface 382 F The FilterConfig interface 384 F The FilterChain interface 384 F The request and response wrapper classes 385
- 18.3 Configuring a filter 385
- The <filter> element 385 F The <filter-mapping> element 386 F Configuring a filter chain 386
- 18.4 Advanced features 389
- Using the request and response wrappers 389 F Important points to remember about filters 395 F Using filters with MVC 395
- 18.5 Summary 396
- Appendices
- A Installing Tomcat 4.0.1 397
- B An introduction to XML 402
- C A sample web.xml file 411
- D Review Q & A 415
- E Exam Quick Prep 475
- Exception handling
- Session management
- Security
- Custom tags
- Design patterns
- Filters
- All exam objectives, carefully explained
- 120 review questions
- Quick Prep section for last-minute cramming
- CD contains:
- JWebPlus simulator (3 practice tests, 180 additional questions)
- Searchable PDFs of entire book
- Tomcat
- Servlet/JSP specifications
index 521
CD-ROM contents 531
DESCRIPTION
With the tremendous penetration of J2EE in the enterprise, passing the Sun Certified Web Component Developer exam has become an important qualification for Java developers. To pass the SCWCD exam (Exam Number: 310-080) you need to answer 60 questions in 90 minutes and get 61% of them right. You also need $150, and this book.
SCWCD Exam Study Kit helps you learn all the concepts, large and small, that you must know to pass the exam. In this must-have book, you can be sure that no exam topics are missed.
The exam is for Sun Certified Java Programmers who have a certain amount of experience with Servlets and JSPs, but for those who do not, the book starts with three introductory chapters on these topics. Although SCWCD Exam Study Kit has one purpose, to help you get certified, you will find yourself returning to it as a reference after passing the exam.
The CD includes three bonus practice exams from the popular test simulator, JWebPlus, which helps you reinforce key concepts. All questions are followed with detailed explanations. It also includes Tomcat, the Servlet/JSP specifications, related RFCs and a convenient, searchable electronic version of the book.
What's Inside:
WHAT THE READERS SAY ABOUT THIS BOOK...
"SCWCD Exam study kit book from manning is GOOD. Forget the other one, too many errors, if you are not interested to burn your money and read a long-long list of errata plus errata for erratas."
--A reader from Java Programmer Certification Exam And Training
"I also purchased the book by Sybex for the SCWCD. After reading two chapters in that book, I switched to this book and never looked back."
-- An Amazon reader
ABOUT THE AUTHORS...
Hanumant Deshmukh develops Java certification software for Enthuware.com and manages JDiscuss.com, a site for Java certification aspirants. He lives in Iselin, New Jersey.
Jignesh Malavia is a senior technical architect at SourceCode, Inc. who writes Enthuware.com SCWCD exams. He lives in Ardsley, New York..
