Oracle 1Z1-899 Actual Free Exam Questions & Community Discussion
Which java code snippet checks whether the user is of the role "MANAGER" for a given HttpServRequest,
httpServletRequest?
httpServletRequest?
Correct Answer: B
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?
(Choose two)
(Choose two)
Correct Answer: A,E
Vote an answer
To add a servlet to a context that has not been declared either via annotation or via the descriptor, during context initialization time the following API can be used (Choose three.)
Correct Answer: C,D,E
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
A cookie may be set to be an HttpOnly cookie. Setting a cookie to be HttpOnly results in (Choose two)
Correct Answer: A,C
Vote an answer
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: A
Vote an answer
You want to create a valid directory structure for your Java EE web application, and your application uses tag files and a JAR file.
Which three must be located directly in your WEB-INF directory (NOT in a subdirectory of WEB-INF)?
(Choose three.)
Which three must be located directly in your WEB-INF directory (NOT in a subdirectory of WEB-INF)?
(Choose three.)
Correct Answer: A,C,E
Vote an answer
Given an HttpServletRequest request and an httpServletResponse response:
41. HttpSession session = null;
42. / / insert code here
43. if (session = = null) {
44. / / do something if session does not exist
45. } else {
46. / / do something if session exists
47. }
To implement the design intent, which statement must be inserted at line 42?
41. HttpSession session = null;
42. / / insert code here
43. if (session = = null) {
44. / / do something if session does not exist
45. } else {
46. / / do something if session exists
47. }
To implement the design intent, which statement must be inserted at line 42?
Correct Answer: B
Vote an answer
Which defines the welcome files in a web application deployment descriptor?
Correct Answer: A
Vote an answer
Given that a web application consists of two HttpServlet classes, ServletA and ServletB, and the ServerletA.service method:
20. String key = "com.example.data";
21. session.setAttribute(key, "Hello");
22. object value = session.getAttribute(key);
23.
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)
20. String key = "com.example.data";
21. session.setAttribute(key, "Hello");
22. object value = session.getAttribute(key);
23.
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)
Correct Answer: A,C
Vote an answer
0
0
0
10
