Oracle 1z0-899 Exam Practice Questions (P. 2)
- 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 #6
Given:
1. <% int[] nums = {42,420,4200};
2. request.setAttribute("foo", nums); %>
3. ${5 + 3 It 6}
4. S(requestScope['foo'][0] ne 10 div0>
5. ${10 div 0}
What is the result?
1. <% int[] nums = {42,420,4200};
2. request.setAttribute("foo", nums); %>
3. ${5 + 3 It 6}
4. S(requestScope['foo'][0] ne 10 div0>
5. ${10 div 0}
What is the result?
- Atrue true
- Bfalse true
- Cfalse true 0
- Dtrue true Infinity
- Efalse true Infinity
- FAn exception is thrown
- GCompilation or translation fails
Correct Answer:
E
E
send
light_mode
delete
Question #7
You are building a web application with a scheduling component. On the JSP, you need to show the current date, the date of the previous week, and the date of the next week.
To help you present this information, you have created the following EL functions in the d namespace:
✑ Name : curData; signature: java.util.utilDate CurrentDate()
✑ Name : curData; signature: java.util.utilDate addweek (java.util.Date, int)
✑ Name: dateString; signature: java.util.String getDataString (jave.util.Data)
Which EL code snippet will generate the string for the previous week?
To help you present this information, you have created the following EL functions in the d namespace:
✑ Name : curData; signature: java.util.utilDate CurrentDate()
✑ Name : curData; signature: java.util.utilDate addweek (java.util.Date, int)
✑ Name: dateString; signature: java.util.String getDataString (jave.util.Data)
Which EL code snippet will generate the string for the previous week?
- A${d:dateString(affWeek(curDate(), -1)) }
- B${d:dateString [addWeek[curDate[], - ]] }
- C${d:dateString [d:addWeek[d:curDate[], - 1]] }
- D${d:dateString (d:addWeek(d:curDate(), -1)) }
Correct Answer:
D
D
send
light_mode
delete
Question #8
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)
- Arequest-getHeader("X-Retries")
- Brequest.getlntHeader("X-Retries")
- Crequest.getRequestHeader("X-Retries")
- Drequest.getHeaders{"X-Retries").get(0)
- Erequest.getRequestHeaders("X-Retries").get(0)
Correct Answer:
AB
AB
send
light_mode
delete
Question #9
Given an HttpServletRequestrequest and HttpResponseresponse, which sets a cookie "username" with the value "joe" in a servlet?
- Arequest.addCookie("username", "joe")
- Brequest.setCookie("username", "joe")
- Cresponse.addCookie("username", "joe")
- Drequest.addHeader(new Cookie("username", "joe"))
- Erequest.addCookie(new Cookie("username", "joe"))
- Fresponse.addCookie(new Cookie("username", "joe"))
- Gresponse.addHeader(new Cookie("username", "joe"))
Correct Answer:
F
F
send
light_mode
delete
Question #10
Which annotation enables a servlet to efficiently process requests of typo multipart/form-data that involve large files being uploaded by the client?
- A@AcceptMultipart
- B@MultiPartConfig
- C@MultiPartFormData
- D@WebServlet (multipart = true)
Correct Answer:
B
Reference:
http://www.scribd.com/ilinchen2008/d/38764279-Servlet3-0-Specs
(page 22, last paragraph)
B
Reference:
http://www.scribd.com/ilinchen2008/d/38764279-Servlet3-0-Specs
(page 22, last paragraph)
send
light_mode
delete
All Pages