Oracle 1z0-899 Exam Practice Questions (P. 3)
- Full Access (108 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #11
APIs for dynamically registering servlets and filters can be called at:
- AContext initialization time
- BAny time
- CThere is no way to dynamically register servlets and filters
- DContext destruction time
- EInjected into a servlet context
Correct Answer:
A
A
send
light_mode
delete
Question #12
ServletRegistration.Dynamic can be used to configure (Choose two)
- AFilter mappings
- Badd init params
- Cset asyncSupported to true
- Dadd Listeners
Correct Answer:
BC
Reference:
http://www.softwareengineeringsolutions.com/blogs/2010/08/01/
(3rd paragraph)
BC
Reference:
http://www.softwareengineeringsolutions.com/blogs/2010/08/01/
(3rd paragraph)
send
light_mode
delete
Question #13
A web application wants to register a new servlet at runtime using one of the servletContext.addServlet methods.
In the implementation of which method is it legal to perform this operation?
In the implementation of which method is it legal to perform this operation?
- AAsyncListner.oncomplete
- BServlet.init
- CServletContextListener.contextInitialize
- DServletrequestListener.contextInitialize
Correct Answer:
C
C
send
light_mode
delete
Question #14
You want to create a filter for your web application and your filter will implement
.servlet.Filter.
Which two statements are true? (Choose two)
.servlet.Filter.
Which two statements are true? (Choose two)
- AYour filter class must implement an init method and a destroy method.
- BYour filter class must also implement javax.sarvlat.FilterChain.
- CWhen your filter chains to the next filter, it should pass the same arguments it received in its doFilter method.
- DThe method that your filter invokes on the object it received that implements javax servlet.Filterchain can invoke either another filter or a servlet.
- EYour filter class must implement a doFilter method that takes, among other things, an HttpServletRequest object and an HttpServletresponse object.
Correct Answer:
AD
AD
send
light_mode
delete
Question #15
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?
Which code snippet in the Front Controller servlet dispatches the request to the order retrieval servlet?
- Areques.setAttribute ("orderID", orderIS); request.setAttribute("jspURL", jspURL); = context.getRequestDispathcher ("/WEB – INF / retrieveOrder.do"); view.forward(request, response)
- Breques.setAttribute ("orderID", orderIS); request.setAttribute("jspURL", jspURL); Dispatcher view = request.getDispatcher (".WEB – INF / retrieveOrder.do"); View.forwardRequest (request, response);
- CString T= "/WEB – INF / retrieveOrder.do?orderID = %d&jspURl = %s"; String url = String.format (T, ordered, jspURL); = context.getRequestDispatcher (url); View.forward (request, response) ;
- DString T= "/WEB – INF / retrieveOrder.do?orderID = %d&jspURl = %s"; String url = String.format (T, ordered, jspURL); = context.getRequestDispatcher (url);
Correct Answer:
C
C
send
light_mode
delete
All Pages