SUN CERTIFIED WEB COMPONENT DEVELOPER FOR JAVA 2 PLATFORM, ENTERPRISE EDITION (J2EE[tm])

Objectives for SCWCD

New exam objectives

Section 1 - The Servlet Model

1.1 For each of the HTTP methods, GET, POST, and PUT, identify the corresponding method in the HttpServlet class.

1.2 For each of the HTTP methods, GET, POST, and HEAD, identify triggers that might cause a browser to use the method, and identify benefits or functionality of the method.

1.3 For each of the following operations, identify the interface and method name that should be used:

  1. Retrieve HTML form parameters from the request
  2. Retrieve a servlet initialization parameter
  3. Retrieve HTTP request header information
  4. Set an HTTP response header; set the content type of the response
  5. Acquire a text stream for the response
  6. Acquire a binary stream for the response
  7. Redirect an HTTP request to another URL

1.4 Identify the interface and method to access values and resources and to set object attributes within the following three Web scopes:

  1. Request
  2. Session
  3. Context

1.5 Given a life-cycle method: init, service, or destroy, identify correct statements about its purpose or about how and when it is invoked.

1.6 Use a RequestDispatcher to include or forward to a Web resource.

Section 2 - The Structure and Deployment of Modern Servlet Web Applications

2.1 Identify the structure of a Web Application and Web Archive file, the name of the WebApp deployment descriptor, and the name of the directories where you place the following:

  1. The WebApp deployment descriptor
  2. The WebApp class files
  3. Any auxiliary JAR files

2.2 Match the name with a description of purpose or functionality, for each of the following deployment descriptor elements:

  1. Servlet instance
  2. Servlet name
  3. Servlet class
  4. Initialization parameters
  5. URL to named servlet mapping

Section 3 - The Servlet Container Model

3.1 Identify the uses for and the interfaces (or classes) and methods to achieve the following features:

  1. Servlet context init. parameters
  2. Servlet context listener
  3. Servlet context attribute listener
  4. Session attribute listeners

3.2 Identify the WebApp deployment descriptor element name that declares the following features:

  1. Servlet context init. parameters
  2. Servlet context listener
  3. Servlet context attribute listener
  4. Session attribute listeners

3.3 Distinguish the behavior of the following in a distributable:

  1. Servlet context init. parameters
  2. Servlet context listener
  3. Servlet context attribute listener
  4. Session attribute listeners

Section 4 - Designing and Developing Servlets to Handle Server-side Exceptions

4.1 For each of the following cases, identify correctly constructed code for handling business logic exceptions, and match that code with correct statements about the code's behavior: Return an HTTP error using the sendError response method; Return an HTTP error using the setStatus method.

4.2 Given a set of business logic exceptions, identify the following: The configuration that the deployment descriptor uses to handle each exception; How to use a RequestDispatcher to forward the request to an error page; Specify the handling declaratively in the deployment descriptor.

4.3 Identify the method used for the following: Write a message to the WebApp log; Write a message and an exception to the WebApp log.

Section 5 - Designing and Developing Servlets Using Session Management

5.1 Identify the interface and method for each of the following:

  1. Retrieve a session object across multiple requests to the same or different servlets within the same WebApp
  2. Store objects into a session object
  3. Retrieve objects from a session object
  4. Respond to the event when a particular object is added to a session
  5. Respond to the event when a session is created and destroyed
  6. Expunge a session object

5.2 Given a scenario, state whether a session object will be invalidated.

5.3 Given that URL-rewriting must be used for session management, identify the design requirement on session-related HTML pages.

Section 6 - Designing and Developing Secure Web Applications

6.1 Identify correct descriptions or statements about the security issues:

  1. Authentication, authorization
  2. Data integrity
  3. Auditing
  4. Malicious code
  5. Web site attacks

6.2 Identify the deployment descriptor element names, and their structure, that declare the following:

  1. A security constraint
  2. A Web resource
  3. The login configuration
  4. A security role

6.3 Given an authentication type: BASIC, DIGEST, FORM, and CLIENT-CERT, identify the correct definition of its mechanism.

Section 7 - Designing and Developing Thread-safe Servlets

7.1 Identify which attribute scopes are thread-safe:

  1. Local variables
  2. Instance variables
  3. Class variables
  4. Request attributes
  5. Session attributes
  6. Context attributes

7.2 Identify correct statements about differences between the multi-threaded and single-threaded servlet models.

7.3 Identify the interface used to declare that a servlet must use the single thread model.

Section 8 - The Java Server Pages (JSP) Technology Model

8.1 Write the opening and closing tags for the following JSP tag types:

  1. Directive
  2. Declaration
  3. Scriptlet
  4. Expression

8.2 Given a type of JSP tag, identify correct statements about its purpose or use.

8.3 Given a JSP tag type, identify the equivalent XML-based tags.

8.4 Identify the page directive attribute, and its values, that:

  1. Import a Java class into the JSP page
  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

8.5 Identify and put in sequence the following elements of the JSP page lifecycle:

  1. Page translation
  2. JSP page compilation
  3. Load class
  4. Create instance
  5. Call jspInit
  6. Call _jspService
  7. Call jspDestroy

8.6 Match correct descriptions about purpose, function, or use with any of the following implicit objects:

  1. request
  2. response
  3. out
  4. session
  5. config
  6. application
  7. page
  8. pageContext
  9. exception

8.7 Distinguish correct and incorrect scriptlet code for:

  1. A conditional statement;
  2. An iteration statement

Section 9 - Designing and Developing Reusable Web Components

9.1 Given a description of required functionality, identify the JSP page directive or standard tag in the correct format with the correct attributes required to specify the inclusion of a Web component into the JSP page.

Section 10 - Designing and Developing JSP pages Using JavaBean Components

10.1 For any of the following tag functions, match the correctly constructed tag, with attributes and values as appropriate, with the corresponding description of the tag's functionality:

  1. Declare the use of a JavaBean component within the page.
  2. Specify, for jsp: useBean or jsp: getProperty tags, the name of an attribute.
  3. Specify, for a jsp: useBean tag, the class of the attribute.
  4. Specify, for a jsp: useBean tag, the scope of the attribute.
  5. Access or mutate a property from a declared JavaBean.
  6. Specify, for a jsp: getProperty tag, the property of the attribute.
  7. Specify, for a jsp: setProperty tag, the property of the attribute to mutate, and the new value.

10.2 Given JSP page attribute scopes: request, session, application, identify the equivalent servlet code.

10.3 Identify techniques that access a declared JavaBean component.

Section 11 - Designing and Developing JSP pages Using Custom Tags

11.1 Identify properly formatted tag library declarations in the Web application deployment descriptor.

11.2 Identify properly formatted taglib directives in a JSP page.

11.3 Given a custom tag library, identify properly formatted custom tag usage in a JSP page. Uses include:

  1. An empty custom tag
  2. A custom tag with attributes
  3. A custom tag that surrounds other JSP code
  4. Nested custom tags

Section 12 - Designing and Developing a Custom Tag Library

12.1 Identify the tag library descriptor element names that declare the following:

  1. The name of the tag
  2. The class of the tag handler
  3. The type of content that the tag accepts
  4. Any attributes of the tag

12.2 Identify the tag library descriptor element names that declare the following:

  1. The name of a tag attribute
  2. Whether a tag attribute is required
  3. Whether or not the attribute's value can be dynamically specified

12.3 Given a custom tag, identify the necessary value for the bodycontent TLD element for any of the following tag types:

  1. Empty-tag
  2. Custom tag that surrounds other JSP code
  3. Custom tag that surrounds content that is used only by the tag handler

12.4 Given a tag event method (doStartTag, doAfterBody, and doEndTag), identify the correct description of the methods trigger.

12.5 Identify valid return values for the following methods:

  1. doStartTag
  2. doAfterBody
  3. doEndTag
  4. PageConext.getOut

12.6 Given a "BODY" or "PAGE" constant, identify a correct description of the constant's use in the following methods:

  1. doStartTag
  2. doAfterBody
  3. doEndTag

12.7 Identify the method in the custom tag handler that accesses:

  1. A given JSP page's implicit variable
  2. The JSP page's attributes

12.8 Identify methods that return an outer tag handler from within an inner tag handler.

Section 13 Design Patterns

13.1 Given a scenario description with a list of issues, select the design pattern (Value Objects, MVC, Data Access Object, or Business Delegate) that would best solve those issues.

13.2 Match design patterns with statements describing potential benefits that accrue from the use of the pattern, for any of the following patterns:

  1. Value Objects
  2. MVC
  3. Data Access Object
  4. Business Delegate