当前分类: SCWCD(310-083)
问题:多选题A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()AidBnameCbeanDtypeEscope...
查看答案
问题:单选题Which implicit object is used in a JSP page to retrieve values associated with entries inthe deployment descriptor?()A ConfigB RequestC SessionD Application...
问题:多选题A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr. Which two properly set the title in this scenario?()Atitle${titleStr}/titleBtitle${initParam.titleStr}/titleCtitle${params[0].titl...
问题:多选题Given: 3.class MyServlet extends HttpServlet { 4.public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException,IOException { 5.// servlet code here ... 26.} 27.} If the DD contains a single security constraint associated w...
问题:多选题Given: 6. Which two successfully translate and result in a value of true?()A${true or false}B${requestScope[foo][0] 500}C${requestScope[’foo’][1] = 420}D${(requestScope[’foo’][0] lt 50) (3 gt 2)}...
问题:多选题Given: 11. 15. Which three EL expressions, inserted at line 15,are valid and evaluate to "3"?()A${vals.2}B${vals[2]}C${vals.index}D${vals[index]}E${vals}[index]F${vals[vals[index-1]]}...
问题:单选题A developer has used this code within a servlet: 62.if(request.isUserInRole("vip")) { 63.// VIP-related logic here 64.} What else must the developer do to ensure that the intended security goal is achieved?()A Create a user called vip in the security r...
问题:单选题Which JSTL code snippet can be used to import content from another web resource?()A c:import url=foo.jsp/B c:import page=foo.jsp/C c:include url=foo.jsp/D c:include page=foo.jsp/...
问题:单选题Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here26. } Which should you insert at line 2...
问题:多选题You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()AIn the init method.BIn the jspInit method.CIn the ...
问题:单选题Given this fragment from a Java EE deployment descriptor: 341. 342.java.lang.Throwable 343./mainError.jsp 344. 345. 346.java.lang.ClassCastException 347./castError.jsp 348. If the web application associated with the fragment above throws a ClassCastE...
问题:单选题A developer is designing a web application that makes many fine-grained remote data requests for eachclient request. During testing, the developer discovers that the volume of remote requests significantlydegrades performance of the application. Which ...
问题:多选题You are designing an n-tier Java EE application. You have already decided that some of your JSPs willneed to get data from a Customer entity bean. You are trying to decide whether to use a Customer stubobject or a Transfer Object. Which two statements ...
问题:单选题Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface: public interface ApplicationController {public String invoke(HttpServletRequest request)} The return value of this method ...
问题:多选题Which two are true about authentication?()AForm-based logins should NOT be used with HTTPS.BWhen using Basic Authentication the target server is NOT authenticated.CJ2EE compliant web containers are NOT required to support the HTTPS protocol.DWeb contai...
问题:单选题Which ensures that a JSP response is of type "text/plain"?()A %@ page mimeType=text/plain %B %@ page contentType=text/plain %C %@ page pageEncoding=text/plain %D %@ page contentEncoding=text/plain %E % response.setEncoding(text/plain); %...
问题:多选题A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()Aprefix:myTag a=foo b=bar c=baz /Bprefix:myTag attributes={foo,bar,baz} /Cprefix:myTag jsp:attribute a=foo b=bar c=baz /Dprefix:myTagjsp:attribute ...
问题:单选题The Squeaky Bean company has decided to port their web application to a new J2EE 1.4 container. Whilereviewing the application, a developer realizes that in multiple places within the current application, nearlyduplicate code exists that finds enterpri...
问题:单选题You have a new IT manager that has mandated that all JSPs must be refactored to include no scritpletcode. The IT manager has asked you to enforce this. Which deployment descriptor element will satisfy thisconstraint?()A jsp-property-group. url-pattern*...
问题:单选题The JSP developer wants a comment to be visible in the final output to the browser. Which comment styleneeds to be used in a JSP page?()A !-- this is a comment --B % // this is a comment %C %-- this is a comment --%D % /** this is a comment **/ %...