问题:单选题What is the result?()AThe program runs and prints nothing.BThe program runs and prints “Equal”.CAn error at line 5 cause compilation to fail.DThe program runs but aborts with an exception.
查看答案
问题:单选题} 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.
问题:单选题Which the statement is true?()AThe Error class is a Runtime Exception.BNo exceptions are subclasses of Error.CAny statement that may throw an Error must be enclosed in a try block.Dany statement that may throw an Exception must be enclosed in a try block.EAny statement that may throw an Runtime Exception must be enclosed in a try block.
问题:单选题In form-based authentication, what must be included in the HTML returned from the URL specified by the element?()Aa base-64 encoded user name and passwordBa form that POSTs to the j_security_check URLCan applet that requests the user name and password from the userDa hidden field that supplies the login-constraint used by the application
问题:多选题A Company.com developer has created a web application that includes a servlet for each use case in the application. These servlets have become rather difficult to maintain because the request processing methods have become very large. There is also common processing code in many servlets because these use cases are very similar. Which two design patterns can be used together to refactor and simplify this web application? ()AProxyBView HelperCFront ControllerDSession FaçadeEBusiness DelegateFModel-View-Controller
问题:单选题Which the HTTP method represents a request for information about the supported methods on an HTTP server?()AGETBINFOCHEADDTRACEEOPTIONS
问题:单选题Which the security mechanism uses the concept of a realm?()AauthorizationBdata integrityCconfidentialityDauthentication
问题:多选题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.
问题:单选题What is the result( )?AThe program prints “0”.BThe program prints “4”.CThe program prints “8”.DThe program prints “12”.EThe code does not compile.
问题:单选题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
问题:单选题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.
问题:多选题A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. Which two are true? ()AA element in the echo tag LTD must have the value JSPBThe echo tag handler must define the setAttribute (String key, String value) methodCThe true element must appear in the echo tag TLDDThe class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interfaceEThe class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface
问题:单选题Which is the valid identifier?()AfalseBdefaultC_objectDa-class
问题:单选题Which HTTP method has the characteristic that multiple indential requests may produce side effect beyond those of a single request()?APUTBGETCINFODPOSTEHEADFTRACE
问题:单选题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
问题:单选题Within the web application deployment descriptor, which defines a valid JNDI environment entry()AABBCCDD
问题:多选题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>
问题:多选题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
问题:单选题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