A. ${product ID}
B. ${param.productID}
C. ${params.productID}
D. ${params.productID[1]}
E. ${paramvalues.productID}
F. ${paramValues.productID[0]}
G. ${pageContext.request.productID}
您可能感兴趣的试卷
你可能感兴趣的试题
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
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
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.
A. All URLs returned by the server are rewritten.
B. An HttpSession object is created if necessary.
C. The user name and password of the user are checked.
D. The session ID is stored in the HTTP response as a cookie.
A. javax.servlet.http.HttpSessionListener
B. javax.servlet.http.HttpSessionBindingListener
C. javax.servlet.http.HttpSessionCreationListener
D. javax.servlet.http.HttpSessionActivationListener
A. The session object must be declared explicity.
B. The request and response objects are available implicity.
C. The output stream is available through the implicit outStream object.
D. The servlet context is available through the implicit servletContext object.
E. The JspContext for the tag file is available through the implicit jspContext object.
A. pageContext.getAttribute(“foo”);
B. getPageContext().getAttribute(“foo”);
C. pageContext.getApplicationScope(“foo”);
D. pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);
E. getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);
最新试题
For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()
Within the web application deployment descriptor, which defines a valid JNDI environment entry()
Which is the true choice about the web container request processing model()?
What code, inserted at line 21, is called prior to a session being migrated to a different JVM assuming the web application containing MyExample is deployed in a container which supports distributed applications?()
Which two are true?()
Which the two are characteristics of the Service Locator pattern?()
Given that session is a valid HttpSession object: Int max = session.getAttribute(“MyReallyLongName”); Which is true?()
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”);What is the result?()
Which the three interfaces need to be declared in the web application deployment descriptor? ()
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? ()