Given an HttpServletRequestrequest and HttpResponseresponse, which sets a cookie "username" with the value "joe" in a servlet?
A. request.addCookie("username", "joe")For which three events can web application event listeners be registered? (Choose three.)
A. when a session is createdA web application for business expense reporting allows uploading expense receipts. Multiple receipts can be uploaded single step using one HTTP request. The servlet that processes the request has been marked with the @MultipartConfig annotation. Which method should the servlet use to access the uploaded files?
A. HttpServletRequest.getParts()Given this fragment in a servlet:
23.
if(reg.isUserInRole("Admin")) {
24.
// do stuff
25.
}
And the following fragment from the related Java EE deployment descriptor:
812.
813.
814.
815.
900.
901.
902.
903.
What is the result?
A. Line 24 can never be reached.When using Servlet asynchronous API if you want to dispatch the request back to a particular url -"/url" within the same Servlet Context which of the following API would you use?
A. ASyncContext.dispatch();Your web application requires the ability to load and remove web files dynamically to the web container's file system? Which two HTTP methods are used to perform these actions? (Choose two)
A. PUTWhich java code snippet checks whether the user is of the role "MANAGER" for a given HttpServRequest, httpServletRequest?
A. httpServletRequest.isUserInRole("MANAGER");Users of your web application have requested that they should be able to set the duration of their sessions. So for example, one user might want a webapp to stay connected for an hour rather than the webapp's default of fifteen minutes; another user might want to stay connected for a whole day.
Furthermore, you have a special login servlet that performs user authentication and retrieves the object from the database. You want to augment this code to set up the user's specified session duration.
Which code snippet in the login servlet will accomplish this goal?
A. User user = / / retrieves the user objects object from the database session.setDurationInterval (user.getSessionDuration());You are working on a JSP that is intended to inform users about critical errors in the system. The JSP code is attempting to access the exception that represents the cause of the problem, but your IDE is telling you that the variable does not exist. What should you do to address this problem?
A. Add a page directive stating that this page is an error handlerWhich two are true about the JSTL core iteration custom tags? (Choose two.)
A. It may iterate over arrays, collections, maps, and strings.Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-899 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.