[Highest Quality] 1Z0-899 Oracle sample question 21-30 (Oct 2021)

Want to know Ucertify 1Z0-899 Exam practice test features? Want to lear more about Oracle Java EE 6 Web Component Developer Certified Expert Exam certification experience? Study Precise Oracle 1Z0-899 answers to Abreast of the times 1Z0-899 questions at Ucertify. Gat a success with an absolute guarantee to pass Oracle 1Z0-899 (Java EE 6 Web Component Developer Certified Expert Exam) test on your first attempt.

2021 Oct 1Z0-899 exam engine


Assume session is an HttpSession, and is not referenced anywhere else in ServletA. 

Which two changes, taken together, ensure that value is equal to “Hello” on line 23? (Choose two) A. ensure that the ServletB.service method is synchronized 

B. ensure that the ServletA.service method is synchronized 

C. ensure that ServletB synchronizes on the session object when setting session attributes 

D. enclose lines 21-22 in synchronized block: 

synchronized(this) ( 

session.setAttribute(key, “Hello”); 

value = session.getAttribute(key); 

E. enclose lines 21-22 in synchronized block: 

synchronized(session) ( 

session.setAttribute(key, “Hello”); 

value = session.getAttribute(key); 

Answer: CE 

Q22. You are building a dating web site. The client’s date of birth is collected along with lots of other information. The Person class has a derived method, getAge() :int, which returns the person’s age calculated from the date of birth and today’s date. In one of your JSPs you need to print a special message to clients within the age group of 25 through 35. 

Which two EL code snippets will return true for this condition? (Choose two.) 

A. ${client.age in [25,35]} 

B. ${client.age between [25,35]} 

C. ${client.age between 25,35} 

D. ${client.age <= 35 && client.age >= 25} 

E. ${client.age le 35 and client.age ge 25} 

F. ${client.age > 35 && client.age < 25} 

Answer: DE 

Q23. You need to create a JavaBean object that is used only within the current ISP page. It must NOT be accessible to any other page including those that this page might import. 

Which JSP standard action < .in accomplish this goal? 

A. <jsp:useBean id = ‘pageBean’ type = ‘com.example.MyBean’ /> 

B. <jsp:useBean id = ‘pageBean’ class = ‘com.example.MyBean’ /> 

C. <jsp:makeBean id = ‘pageBean’ type = ‘com.example.MyBean’ /> 

D. <jsp:makeBean id = ‘pageBean’ class = ‘com.example.MyBean’ /> 

E. <jsp:useBean id = ‘pageBean’ class = ‘com.example.MyBean’ /> 

F. <jsp:makeBean id = ‘pageBean’ class = ‘com.example.MyBean’ /> 

Answer: B

Q24. Which Java expression can be used to check whether the web container is currently configured to track sessions via URL rewriting? 

A. servletContext.getSessionCookiesConfiq() .isHttpOnly() 

B. servletContext.getSessionCookiesConfiq() .isSecure() 

C. servletContext.getDefaultSessionTrackingModes() .contains(SessionTrackingMode.URL) 

D. servletContext.getEffectiveSessionTrackingModes() .contains (SessionTrackingMode.URL) 

Answer: D 

Q25. Which method must be used to encode a URL passed as an argument to HttpServletResponse. 

sendRedirect when using URL rewriting for session tracking? 

A. ServletResponse.encodeURL 

B. HttpServletResponse.encodeURL 

C. ServletResponse.encodeRedirectURL 

D. HttpServletResponse.encodeRedirectURL 

Answer: D 

1Z0-899 practice test

Rebirth 1Z0-899 download:



Q27. A cookie may be set to be an HttpOnly cookie. Setting a cookie to be HttpOnly results in (Choose two) 

A. Client to not expose the cookie to client side scripting code 

B. Does not work with https protocol 

C. prevent certain types of cross-site scripting attacks 

D. There is no such thing as an HttpOnly cookie 

Answer: AC 

Q28. 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? 

A. HttpServletRequest.getParts() 

B. HttpServletRequest.getData() 

C. servletRequest.getParts() 

D. servletRequest.getAllParts() 

Answer: A 

Q29. Given the java code snippet in contextInitialized method of a ServletContextListner: 

ServletRegistration.Dynamic sr = (ServletRegistration.Dynamic)sc.addServlet 

(“myServlet”, myServletClass); 




Which statement is true? 

A. “/abc” is mapped to “myservlet”. The servletSecurityElementy applies to both “/abc” and “/def”. 

B. Both “/abc” and “/def” are mapped to “myservlet”. The servletSecurityElementy applies to “/abc”. 

C. Both “/abc” and “/def” are mapped to “myservlet”. The servletSecurityElementy applies to “/def”. 

D. Both “/abc” and “/def” are mapped to “myservlet”. The servletSecurityElementy applies to both “/abc” and “/def”. 

E. Both “/abc” and “/def” are mapped to “myservlet”. The servletSecurityElementy applies to “/abc”, but the behavior for “/def” is not specified. 

Answer: E 

Q30. Given the portion of a valid Java EE web application’s directory structure: 

You want to know whether File1.html, File2.html, and/or File3.html is protected from direct access by your web client’s browsers. What statement is true? 

A. All three files are directly accessible. 

B. Only File1.html is directly accessible. 

C. Only File2.html is directly accessible. 

D. Only File3.html is directly accessible. 

E. Only File1.html and File2.html are directly accessible. 

F. Only File1.html and File3.html are directly accessible. 

G. Only File2.html and File3.html are directly accessible. 

Answer: B 

see more 1Z0-899 dumps