For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()
A. id B. name C. type D. param E. property F. reqParam G. attribute
单项选择题A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company. Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet: What is the response output of this JSP page code snippet? ()
A. Default costs 0.0 B. Default costs 49.95 C. Default costs 39.95 D. The Matrix costs 0.0 E. The Matrix costs 49.95 F. The Matrix costs 39.95
单项选择题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. getCreationTime B. invalidateAfter C. getLastAccessedTime D. getMaxInactiveInterval
多项选择题WhichtwoclassesorinterfacesprovideagetSessionmethod?()
A. javax.servlet.http.HttpServletRequest B. javax.servlet.http.HttpSessionContext C. javax.servlet.http.HttpsServletResponse D. javax.servlet.http.HttpSessionBindingEvent E. javax.servlet.http.HttpSessionAttributeEvent
多项选择题Whichthe threeinterfacesneedtobedeclaredinthewebapplicationdeploymentdescriptor?()
A. HttpSessionListener B. HttpSessionBindingListener C. HttpSessionTimedOutListener D. HttpSessionAttributeListener E. HttpSessionActivationListener F. HttpSessionPassivatedListener
单项选择题Given that session is a valid HttpSession object: Int max = session.getAttribute(“MyReallyLongName”); Which is true?()
A. The value returned needs to be cast to an int. B. The getAttribute methos takes two arguments. C. Primitive CANNOT be stored in the HttpSession. D. The HttpSession attribute name must NOT exceed eight characters.