问题:单选题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
查看答案
问题:多选题A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()AidBtypeCnameDclassEscopeFcreate
问题:单选题Within the web application deployment descriptor, which defines a valid JNDI environment entry()AABBCCDD
问题:单选题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?()ATransfer ObjectBService LocatorCIntercepting FilterDBusiness Delegate
问题:多选题Which three are described in the standard web application deployment descriptor?()Asession configurationBMIME type mappingsCcontext root for the applicationDservlet instance pool configurationEweb container default port bindingsFServletContext initialization parameters
问题:多选题Which four types of object can be thrown using the throw statement?()AErrorBEventCObjectDExceptionEThrowableFRuntime Exception
问题:多选题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.
问题:多选题Which two are valid values for the element inside a element of a web application deployment descriptor?()ANULLBSECURECINTEGRALDENCRYPTEDECONFIDENTIAL
问题:单选题A developer is designing a multi-tier web application and discovers a need to log each incoming client request. Which two patterns, taken independently, provide a solution for this problem? ()ATransfer ObjectBService LocatorCFront ControllerDIntercepting FilterEBusiness DelegateFModel-View-Controller
问题:多选题Given: 1. public class Method Over { 2. public void set Var (int a, int b, float c) { 3. } 4. } Which two overload the set Var method()?Aprivate void set Var(int a, float c, int b) {}Bprotected void set Var(int a, int b, float c) {}Cpublic int set Var(int a, float c, int b) {return a:}Dpublic int set Var(int a, int b, float c) {return a:}Eprotected float set Var(int a, int b, float c) {return c:}
问题:单选题Which retrieves the binary input stream on line 13?()Arequest.get Writer ():Brequest.get Reader ():Crequest.get Input Stream():Drequest.get Resource As Stream():Erequest.get Resource As Stream (Servlet Request. REQUEST):
问题:单选题Which is equivalent?( )AABBCCDDEE
问题:多选题Which three are valid values for the body-content attribute of a tag directive in a tag file? ()AELBJSPCemptyDdynamicEscriptlessFtagdependent
问题:多选题Which the two are reserved words in Java?()ArunBimportCdefaultDimplement
问题:单选题The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?()AIt is impossible to determine the deepest nesting depth because it is impossible for tag handlers that extend SimpleTagSupport to communicate with their parent and child tagsBCreate a private non-static attribute in the tag handler class called count of type int initialized to oIncrement count in the doTag method. If the tag has a body, invoke the fragment for that body. Otherwise, output the value of countCStart a counter at 1. Call getChildTags(). If it returns null, output the value of the counter. Otherwise, increment counter and continue from where getChildTags() is called. Skip processing of the body.DIf the tag has a body, invoke the fragment for that body. Otherwise, start a counter at 1. Call getParent(). If it returns null, output the value of the counter. Otherwise, increment the counter and continue from where getParent() is called.
问题:单选题Which defines the welcome files in a web application deployment descriptor?()AABBCCDDEE
问题:单选题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()?ACompilation succeeds and l is printed.BCompilation succeeds and 2 printed.CAn error at line 8 cause compilation to fail.DAn error at line 14 cause complication to fail.EComplication succeeds but an exception is thrown at line 14.
问题:单选题Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application. In which object can the data that A shares with B be stored?()AHttpSessionBServletConfigCServletContextDHttpServletRequestEHttpServletResponse