exam questions

Exam 1z0-899 All Questions

View all questions & answers for the 1z0-899 exam

Exam 1z0-899 topic 1 question 15 discussion

Actual exam question from Oracle's 1z0-899
Question #: 15
Topic #: 1
[All 1z0-899 Questions]

You have a simple wpb application that has a single Front Controller servlet that dispatches to JSPs generate a variety of views. Several of these views require further database processing to retrieve the necessary order object using the orderID request parameter. To do this additional processing, you pass the request first to a servlet that is mapped to the URL pattern /WEB INF / retrieveOrder.do. in the deployment descriptor. This servlet takes two request parameters, the ordered and the jspID and the jspURL. It handles the database calls to retrieve and build the complex order objects and then it dispatches to the jspURL.
Which code snippet in the Front Controller servlet dispatches the request to the order retrieval servlet?

  • A. reques.setAttribute ("orderID", orderIS); request.setAttribute("jspURL", jspURL); = context.getRequestDispathcher ("/WEB – INF / retrieveOrder.do"); view.forward(request, response)
  • B. reques.setAttribute ("orderID", orderIS); request.setAttribute("jspURL", jspURL); Dispatcher view = request.getDispatcher (".WEB – INF / retrieveOrder.do"); View.forwardRequest (request, response);
  • C. String T= "/WEB – INF / retrieveOrder.do?orderID = %d&jspURl = %s"; String url = String.format (T, ordered, jspURL); = context.getRequestDispatcher (url); View.forward (request, response) ;
  • D. String T= "/WEB – INF / retrieveOrder.do?orderID = %d&jspURl = %s"; String url = String.format (T, ordered, jspURL); = context.getRequestDispatcher (url);
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...