A. <web-app> B. <filters> C. <servlet> D. <filter-list>
单项选择题Which retrieves the value associated with “foo” from within an HttpServlet?()
A. String value = getServletConfig( ).getParameter(“foo”); B. String value = getServletContext( ).getAttribute(“foo”); C. Object value = getServletContext( ).getInitParameter(“foo”); D. String value = getServletContext( ).getInitParameter(“foo”)
单项选择题What is the result of a client request of the Source servlet with no query string?()
A. The output “filterAdded = null” is written to the response stream. B. The output “filterAdded = addedByFilter” is written to the response stream. C. An exception is thrown at runtime within the service method of the Source servlet. D. An exeption is thrown at runtime within the service method of the Destination servlet.
多项选择题ForagivenServletresponseresponse,whichtworetrieveanobjectforwritingtextdata?()
A. response.getWriter( ) B. response.getOutputStream( ) C. response.getOutputWriter( ) D. response.getWriter( ) .getOutputStream( ) E. response.getWriter(Writer.OUTPUT_TEXT( )
单项选择题What is the result?()
A. <b></b> B. <b>50</b> C. <b>${5*10}</b> D. The JSP fails to execute
单项选择题AJSPpageneedstoperformsomeoperationsbeforeservicingthefirstrequest.Wherecanthisbedone?()
A. within a method called jspInit B. within the page directive of the JSP page C. within a scriptlet at the top of the JSP page D. within the XML element