Coffee Cram: Mock Exam Chapter 5

  1. When using a RequestDispatcher, the use of which methods can often lead to an IllegalStateException? (Choose all that apply.)

    A.

    read

    B.

    flush

    C.

    write

    D.

    getOutputStream

    E.

    getResourceAsStream

  2. Which statements about ServletContext initialization parameters are true? (Choose all that apply.)

    A.

    They should be used for data that changes rarely.

    B.

    They should be used for data that changes frequently.

    C.

    They can be accessed using

    ServletContext.getParameter(String).

    D.

    They can be accessed using

    ServletContext.getInitParameter(String).

    E.

    They should be used for data that is specific to ...

Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.