problem 1: When you use the MVC pattern, the controller directs the flow of control to:
A) The browser and the model
B) The view, model, and data store
C) The view and the model
D) The model and data store
problem 2: When you use the controller to forward a request to a servlet or JSP, you utilize the forward method of:
A) The request object
B) The ServletContext object
C) The response object
D) A RequestDispatcher object
problem 3: The given Anchor tag demonstrates how to use
View your schedule
A) URL rewriting.
B) Hidden fields.
C) URL encoding.
problem 4: Persistent cookies
A) Are removed after the session ends.
B) Can’t be deleted.
C) Exist after the session ends.
D) Are often called hidden fields.
problem 5: Which of the given is not a benefit of using the MVC pattern for an application?
A) It needs less code
B) JSPs are used for what they do best
C) It is simpler to make changes to the application servlets are used for what they do best JSPs are used for what they do best
D) It is simpler to make changes to the application servlets are used for what they do best JSPs are used for what they do best it is easier to test and debug the application
problem 6: Which of the given statements is invalid?
A) String name = session.getAttribute("fullName");
B) session.setAttribute("fullName", "Ted Andrews");
C) Book book = (Book) session.getAttribute("bookObj");
problem 7: According to the given code from a web.xml file, the error.htm page is called when
A) Any HTTP or Java error occurs.
B) An uncaught exception is thrown.
C) An HTML page can’t be found.
D) An HTTP status code error occurs.
problem 8: If the given JSP tag is coded in a main JSP, what happens when the reports.jsp page is updated?
A) The changes are not updated in the subsequent requests for the main JSP
B) The modifications appear for subsequent requests for the main JSP
C) AJSP error is thrown.
problem 9: The session object is created
A) Every time a browser makes a request for a web page.
B) Every time a browser requests a servlet.
C) Every time a browser requests a jsp
D) The first time a browser requests a servlet or JSP from a web site
problem 10: Whenever you use hidden fields to pass parameters to a servlet or JSP, all however one of the given is true. Which one is it?
A) The parameters are not shown in the URL
B) The user can see the parameters by employing the browser to look at the page’s source code
C) You do not have to store the parameters in the session object
D) You cannot use URL encoding.