Which two techniques can you use to accomplish this goal?

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)

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)

A.
Add attributes to the session object.

B.
Add attributes on the request object.

C.
Add parameters on the request object.

D.
Use the pageContext object to add request attributes.

E.
Add parameters to the JSP’s URL when generating the request dispatcher.



Leave a Reply 6

Your email address will not be published. Required fields are marked *


giuseppe

giuseppe

for me A,D

giuseppe

giuseppe

No I’m wrong pageContext is for jsp, He is talking about servlet: so A,E

giuseppe

giuseppe

🙂 B,E

markchen

markchen

why D is wrong?