问题:单选题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?()AFlyweightBTransfer ObjectCService LocatorDDispatcher ViewEBusiness DelegateFModel-View-Controller
查看答案
问题:单选题Which interface must a class implement to be informed of a session creation event?()Ajavax.servlet.http.HttpSessionListenerBjavax.servlet.http.HttpSessionBindingListenerCjavax.servlet.http.HttpSessionCreationListenerDjavax.servlet.http.HttpSessionActivationListener
问题:多选题Given that a scoped attribute cart exists only in a user’s session, which two, taken independently, ensure the scoped attribute cart no longer exists?()A ${cart = null} B<c:remove var=cart />C<c:remove var=${cart} />D<c:remove var=cart scope=session />E<c:remove scope=session>cart</c:remove>F<c:remove var=${cart} scope=session />G<c:remove scope=session>${cart}</c:remove>
问题:单选题Which makes the local EJB component accessible to the web components in the web application deployment descriptor?()AABBCCDD
问题:单选题Company.com has decided to use the FUBAR Application Server to host their web application. Unfortunately, the FUBAR Application Server uses the server machine’s file system for its JNDI namespace. Every JNDI lookup performed in the web application is translated into a file 1/0 operation, which results in very poor performance. Which J2EE pattern can help with this performance issue?()ATransfer ObjectBService LocatorCIntercepting FilterDModel-View-Controller
问题:单选题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?()AgetCreationTimeBinvalidateAfterCgetLastAccessedTimeDgetMaxInactiveInterval
问题:单选题Which the HTTP method represents a request for information about the supported methods on an HTTP server?()AGETBINFOCHEADDTRACEEOPTIONS
问题:单选题Which HTTP method has the characteristic that multiple indential requests may produce side effect beyond those of a single request()?APUTBGETCINFODPOSTEHEADFTRACE
问题:单选题A developer wants too use EL to invoke a function using S{my:bloof(“foof”)}. Which is always true?()AThe method invoked by this function must be statie.BThe function class must implement the Function interface.CThe expression is NOT a valid EL expression for invoking a function.DThe function must be declared in a web.xml file using the element.EThe function class must have a method with the signature:Void bloof (java.lang.Strings)
问题:多选题Which the two are reserved words in Java?()ArunBimportCdefaultDimplement
问题:多选题In which two locations can library dependencies be defined for a web application? ()Athe web application deployment descriptorBthe /META-INF/dependencies.xml fileCthe /META-INF/MANIFEST.MF manifest fileDthe /META-INF/MANIFEST.MF manifest of a JAR in the web application classpath
问题:单选题Which option prevents the exception thrown by my:errorProne from invoking the error page mechanism and outputs the message "File not found" in the response?()AABBCCDDEE
问题:单选题Which is the valid identifier?()AfalseBdefaultC_objectDa-class
问题:单选题} What is the result?()ACompilation succeeds and 1 is printed.BCompilation succeeds and 2 is printed.CAn error at line 8 causes compilation to fail.DAn error at line 14 causes compilation to fail.
问题:多选题For which three events can web application event listeners be registered? ()Awhen a session is createdBafter a servlet is destroyedCwhen a session has timed outDwhen a cookie has been createdEwhen a servlet has forwarded a requestFwhen a session attribute value is changed
问题:多选题Which the two demonstrate an “is a” relationship?()Apublic interface Person {} Public class Employee extends Person {}Bpublic interface Shape {} public interface Rectangle extends Shape {}Cpublic interface Color {} public class Shape { private Color color; }Dpublic class Species {} public class Animal { private Species species; }Einterface Component {} Class Container implements Component {private Component [] children;
问题:单选题Which HTTP method represents a request for information about the supported methods on an HTTP server?()AGETBINFOCHEADDTRACEEOPTIONS
问题:单选题Which thefollowingstatements about static inner classes is true?()AAn anonymous class can be declared as static.BA static inner class cannot be a static member of the outer class.CA static inner class does not require an instance of the enclosing class.DInstance member of a static inner class can be referenced using the class name of the staticinner class.
问题:多选题Which two are characteristics of the Intercepting Filter pattern?()Ait provides centralized request handling for incoming requests.BIt forces resource authentication to be distributed across web components.CIt reduces coupling between presentation-tier clients and underlying business services.DIt can be added and removed unobtrusively, without requiring changes to existing code.EIt allows preprocessing and postprocessing on the incoming requests and outgoing responses.