nerdexam
Oracle

1Z0-899 · Question #163

Your web application uses a simple architecture in which servlets handle requests and then forward to a JSP using a request dispatcher. You need to pass information calculated in the servlet to the…

The correct answer is B. Add attributes on the request object. E. Add parameters to the JSP's URL when generating the request dispatcher. See the full explanation below for the reasoning.

Question

Your web application uses a simple architecture in which servlets handle requests and then forward to a JSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation. This information must NOT be accessible to any other servlet, JSP or session in the webapp. Which two techniques can you use to accomplish this goal? (Choose two)

Options

  • AAdd attributes to the session object.
  • BAdd attributes on the request object.
  • CAdd parameters on the request object.
  • DUse the pageContext object to add request attributes.
  • EAdd parameters to the JSP's URL when generating the request dispatcher.

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    78% (29)
  • C
    14% (5)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice