問題詳情

34 You have a simple wpb application that has a single Front Controller servlet that dispatches toJSPs generate a variety of views. Several of these views require further database processing toretrieve the necessary order object using the orderID request parameter. To do this additionalprocessing, 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, theorderID and the jspURL. It handles the database calls to retrieve and build the complex order objectsand then it dispatches to the jspURL.Which code snippet in the Front Controller servlet dispatches the request to the order retrievalservlet?IT Certification Guaranteed, The Easy Way!
(A) reques.setAttribute ("orderID", orderID);request.setAttribute("jspURL",jspURL);RequestDispatcher view= context.getRequestDispathcher ("/WEB - INF /retrieveOrder.do");view.forward(request, response)
(B) reques.setParameter ("orderID", orderID);request.setParameter("jspURL", jspURL);Dispatcherview= 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,orderID, jspURL);RequestDispatcher view = context.getRequestDispatcher (url);View.forward(request, response);
(D) String T= "/WEB - INF / retrieveOrder.do?orderID = %d&jspURl = %s";String url = String.format (T,orderID, jspURL);Dispatcher view= context.getDispatcher (url);View.forwardRequest (request,response);

參考答案

無參考答案

內容推薦