阿摩線上測驗
登入
首頁
>
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
相關試題
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
25 ServletContextListeners are invoked in (A) Random order (B) contextInitialized and contextDestroyed are invoked in the order in which they are declared in the web.xml (C) contextInitialized method are invoked in the order in which they are declared in the web.xml and the contextDestroyed method is invoked in the reverse order in which they are declared in the web.xml (D) contextInitialized and contextDestroyed are invoked in the reverse order of which they are declared in the web.xml
#2238448
26 Given the web application deployment descriptor elements: Which element, inserted at line 27, causes the ParamAdder filter to be applied when MyServlet is IT Certification Guaranteed, The Easy Way! invoked by another servlet using the RequestDispatcher.include method? (A) <include/> (B) <dispatcher>INCLUDE</dispatcher> (C) <dispatcher>include</dispatcher> (D) <filter-condition>INCLUDE</filter-condition> (E) <filter-condition>include</filter-condition>
#2238449
27 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? (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.
#2238450
28 An application stores session data in a JavaBean object. The object is then stored in the HttpSession object. Which is true? (A) Synchronization of all bean methods is required to ensure thread safety. (B) Thread safety is not an issue, since concurrent access to a single session is impossible. (C) Appropriate protection against problems caused by concurrent access should be provided by the bean. (D) The servlet should take precautions to ensure that concurrent access to the bean is prevented. (E) The servlet should implement SingleThreadModel
#2238451
相關試卷
無年度 - Java EE 6 Web Component Developer Certified Expert Exam:1z0-899 (101-132)#84682
-999 年 · #84682
無年度 - Java EE 6 Web Component Developer Certified Expert Exam:1z0-899(1-50)#84202
-999 年 · #84202
無年度 - Java EE 6 Web Component Developer Certified Expert Exam:1z0-899(51-100)#84004
-999 年 · #84004