站内搜索
SCDCD(310-081) 问题列表
问题 多选题Which the two are true about the JSTL core iteration custom tags?()AIt may iterate over arrays, collections, maps and strings.BThe body of the tag may contain EL code, but not scripting code.CWhen looping over collections, a loop status object may be used in the tag body.DIt may iterate over a map, but only the key of the mapping may be used in the tag body.EWhen looping over integers (for example begin1=’1’ end=’10’), a loop status object may not be used in the tag body.

问题 单选题A web application uses the HttpSession mechanism to determine if a user is “logged in”. When a user supplies a valid user name and password, an HttpSession is created for that user.  The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession.  Which method in HttpSession is used to accomplish this?()A  getCreationTimeB  invalidateAfterC  getLastAccessedTimeD  getMaxInactiveInterval

问题 单选题1. class A {  2. public byte file Number ( ) { 3. return l;  4. }  5. }  6.  7. Class B extends A {  8. public short getNumber( ) {  9.  return 2;  10. }  11.  12. public short getNumber( ) {  13. B b = new B( );  14. System.out.printIn(b.getNumber( ));  15. }  16. }   What is the result()?A  Compilation succeeds and l is printed.B  Compilation succeeds and 2 printed.C  An error at line 8 cause compilation to fail.D  An error at line 14 cause complication to fail.E  Complication succeeds but an exception is thrown at line 14.

问题 单选题Squeaky Beans Inc. hired an outside consultant to develop their web application. To finish the job quickly, the consultant created several dozen JSP pages that directly communicate with the database. The Squeaky business team has since purchased a set of business objects to model their system, and the Squeaky developer charged with maintaining the web application must now refactor all the JSPs to work with the new system.  Which pattern can the developer use to solve this problem?()A  Transfer ObjectB  Service LocatorC  Intercepting FilterD  Business Delegate

问题 单选题Which retrieves the binary input stream on line 13?()A  request.get Writer ():B  request.get Reader ():C  request.get Input Stream():D  request.get Resource As Stream():E  request.get Resource As Stream (Servlet Request. REQUEST):

问题 单选题A developer wants too use EL to invoke a function using S{my:bloof(“foof”)}. Which is always true?()A  The method invoked by this function must be statie.B  The function class must implement the Function interface.C  The expression is NOT a valid EL expression for invoking a function.D  The function must be declared in a web.xml file using the  element.E  The function class must have a method with the signature:Void bloof (java.lang.Strings)

问题 单选题What is the result()?A  2B  4C  8D  16E  The code will not compile.

问题 多选题A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner. Which two can support this design goal?()AStore the data in a vocal variable.BStore the data in an instance variable.CStore the data in the HttpSession object.DStore the data in the ServletContext object.EStore the data in the ServletRequest object.

问题 单选题A Company.com developer is designing a multi-tier web application and discovers a need to hide the details of establishing and maintaining remote communications from the client. In addition, because the business and resource tiers are distributed, the application needs to minimize the inter-tier network traffic related to servicing client requests.  Which design patterns, working together, address these issues?()A  Front Controller and Transfer ObjectB  Front Controller and Service LocatorC  Business Delegate and Transfer ObjectD  Business delegate and Intercepting FilterE  Model-View-Controller and Intercepting Filter

问题 多选题For a given Servletresponse response, which two retrieve an object for writing text data? ()Aresponse.getWriter( )Bresponse.getOutputStream( )Cresponse.getOutputWriter( )Dresponse.getWriter( ) .getOutputStream( )Eresponse.getWriter(Writer.OUTPUT_TEXT( )

问题 多选题Which two are valid declarations of char?()AChar ch = “a”;Bchar ch = “”;Cchar ch = “café”;Dchar ch = “ucafe”;Echar ch = “ucafe’;Fchar ch = “u10100’;Gchar ch = (char) true;

问题 单选题Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()A  The attribute foo is placed in the applicationB  A ServletContextListener registered for that servlet is notifiedC  A ServletAttributeListener registered for that servlet is notifiedD  An HttpSessionAttributeListener registered for that servlet is notified

问题 单选题A developer is designing a web application that makes many fine-grained remote data requests for each client request. During testing, the developer discovers that the volume of remote requests significantly degrades performance of the application. Which design pattern provides a solution for this problem?()A  FlyweightB  Transfer ObjectC  Service LocatorD  Dispatcher ViewE  Business DelegateF  Model-View-Controller

问题 多选题Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()AAll URLs returned by the server are rewritten.BAn HttpSession object is created if necessary.CThe user name and password of the user are checked.DThe session ID is stored in the HTTP response as a cookie.

问题 单选题A Company.com developer is designing a multi-tier web application and discovers a need to hide the details of establishing and maintaining remote communications from the client. In addition, because the business and resource tiers are distributed, the application needs to minimize the inter-tier network traffic related to servicing client requests.  Which design patterns, working together, address these issues?()A  Front Controller and Transfer ObjectB  Front Controller and Service LocatorC  Business Delegate and Transfer ObjectD  Business delegate and Intercepting FilterE  Model-View-Controller and Intercepting Filter