Oracle Java EE 6 Web Component Developer Certified Expert (1Z1-899) Free Practice Test
Question 1
Which statement is true about web container session management?
Correct Answer: C
Question 2
Given the java code snippet in contextInitialized method of a ServletContextListner:
ServletRegistration.Dynamic sr = (ServletRegistration.Dynamic)sc.addServlet ("myServlet", myServletClass); sr.addMapping("/abc"); sr.setServletSecurityElement(servletSecurityElement); sr.addMapping("/def"); Which statement is true?
ServletRegistration.Dynamic sr = (ServletRegistration.Dynamic)sc.addServlet ("myServlet", myServletClass); sr.addMapping("/abc"); sr.setServletSecurityElement(servletSecurityElement); sr.addMapping("/def"); Which statement is true?
Correct Answer: B
Question 3
To take advantage of the capabilities of modern browsers that use web standards, such as XHTML and CSS, your web application is being converted from simple JSP pages to JSP Document format. However, one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in several web forms to create screen-specific validation functions and are included in these pages with the following statement:

Which JSP code snippet declares that this JSP Document is a JavaScript file?

Which JSP code snippet declares that this JSP Document is a JavaScript file?
Correct Answer: D
Question 4
Given a header in an HI IP request:
X-Retries: 4
A Which two retrieve the value of the header from a given HttpServletRequest request? (Choose two)
X-Retries: 4
A Which two retrieve the value of the header from a given HttpServletRequest request? (Choose two)
Correct Answer: B,C
Question 5
Which is a valid value for the enum EmptyRoleSemantic in Javax.servlet.annotation.ServletSecurity?
Correct Answer: A
Question 6
You have built a web application that you license to small businesses. The webapp uses a context parameter, called licenseExtension, which enables certain advanced features based on your client's license package.
When a client pays for a specific service, you provide them with a license extension key that they insert into the <context-param> of the deployment descriptor. Not every client will have this context parameter so you need to create a context listener to set up a default value in the licenseExtension parameter.
Which code snippet will accomplish this goal?
When a client pays for a specific service, you provide them with a license extension key that they insert into the <context-param> of the deployment descriptor. Not every client will have this context parameter so you need to create a context listener to set up a default value in the licenseExtension parameter.
Which code snippet will accomplish this goal?
Correct Answer: C
Question 7
In a jsp-centric shopping cart application cart application to move a client's home address of Customer object into the shipping address of the order object. The address data is stored in a value object class called Address with properties for: street address, city, province, country, and postal code.
Which two code snippets can be used to accomplish this goal? (Choose two.)
Which two code snippets can be used to accomplish this goal? (Choose two.)
Correct Answer: A,E
Question 8
Which EL expression returns true if no session has been established with current client?
Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 9
When using Servlet asynchronous API if you want to dispatch the request back to a particular url - "url" within the same ServletContext which of the following API would you use?
Correct Answer: E
Question 10
A 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?
@MultipartConfig annotation.
Which method should the servlet use to access the uploaded files?
Correct Answer: B
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).