阿摩線上測驗
登入
首頁
>
OCE
>
無年度 - Java EE 6 Web Component Developer Certified Expert Exam:1z0-899(1-50)#84202
> 試題詳解
複選題
18 ServletRegistration.Dynamic can be used to configure (Choose two)
(A) Filter mappings
(B) add init params
(C) set asyncSupported to true
(D) add Listeners
答案:
登入後查看
統計:
尚無統計資料
詳解 (共 1 筆)
【站僕】摩檸Morning.
B1 · 2020/03/28
#3851051
B C
(共 5 字,隱藏中)
前往觀看
0
0
其他試題
14 A Client wants to find out the size of an image file for which it has a URL, without downloading any of the bytes that comprise the image right away. Which HTTP method should it use? (A) GET (B) PUT (C) HEAD (D) DELETE
#2238437
複選題15 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}
#2238438
16 Given the definition of Myobject and that an instance of Myobject is bound as a session attribute: 8. package com.example; IT Certification Guaranteed, The Easy Way! 6 9. public class Myobject implements 10. javax.servlet.http.HttpSessionBindingListener { 11. // class body code here 12. } Which is true? (A) Only a single instance of Myobject may exist within a session (B) The unbound method of the Myobject instance is called when the session to which it is bound times out (C) The com.example.MyObject must be declared as a servlet event listener in the web application deployment descriptor (D) The valueUnbound method of the Myobject instance is called when the session to which it is bound times out
#2238439
17 Given an HttpServletRequestrequest and HttpResponseresponse, which sets a cookie "username" with the value "joe" in a servlet? (A) request.addCookie("username", "joe") (B) request.setCookie("username", "joe") (C) response.addCookie("username", "joe") (D) request.addHeader(new Cookie("username", "joe")) (E) request.addCookie(new Cookie("username", "joe")) (F). response.addCookie(new Cookie("username", "joe")) G. response.addHeader(new Cookie("username", "joe"))
#2238440
複選題19 A developer chooses to avoid using singieThreadModel but wants to ensure that data If; updated in a thread safe manner. Which two can support this design goal? (Choose two) (A) Store the data in a local variable. (B) Store the data in an instance variable. (C) Store the data in the Httpsession object. (D) Store the data in the sarvletContext object. (E) Store the data in the ServletRequest object.
#2238442
20 View the exhibit. Assuming the tag library in the exhibit is imported with the prefix stock, which custom tag Invocation outputs the contents of the variable exposed by the quote tag? (A) ${var}<stock:quote symbol= "SUNW" /> (B) <stock:quote symbol= "SUNW">$ {var}</stock:quote> (C) <stock:quote symbol= "SUNW" var= "quote" />$ {quote} (D) <stock:quote symbol= "SUNW" var= "quote"><%= quote %></stock:quote>
#2238443
21 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)
#2238444
22 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? (A) session = response.getSession (); (B) session = request.getSession (); (C) session = request.getSession (true); (D) session = request.getSession (false); (E) session = request.getSession ("jsessionid");
#2238445
23 Your web site has many user-customizable features, for example font and color preferences on web pages. Your IT department has already built a subsystem for user preferences using Java SE's lang.util.prefs package APIs and you have been ordered to reuse this subsystem in your web application. You need to create an event listener that stores the user's Preference object when an HTTP session is created. Also, note that user identification information is stored in an HTTP cookie. Which partial listener class can accomplish this goal? (A) Option A (B) Option B (C) Option C (D) Option D
#2238446
複選題24 Which two are true about the JSTL core iteration custom tags? (Choose two.) (A) It may iterate over arrays, collections, maps, and strings. (B) The body of the tag may contain EL code, but not scripting code. (C) When looping over collections, a loop status object may be used in the tag body. (D) It may iterate over map, but only the key of the mapping may be used in the tag body. (E) When looping over integers (for example begin= '1' end= '10'), a loop status object may not be used in the tag body.
#2238447