A. put(String name. Object value)
B. set(String name. Object value)
C. setAttribute(String name. Object value)
D. putAttribute(String name. Object value)
E. addAttribute(String name. Object value)
您可能感兴趣的试卷
你可能感兴趣的试题
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.
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
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
Which two successfully translate and result in a value of true?()
A. ${true or false}
B. ${requestScope[foo][0] > 500}
C. ${requestScope[“foo”][1] = 420}
D. ${(requestScope[“foo”][0] lt 50) && (3 gt 2)
Which EL expression, inserted at line 3 is valid and evaluated to “beanValue”?()
A. ${bean}
B. ${value}
C. ${beanValue}
D. ${com.example.bean}
E. ${requestScope[“com.example.bean”]}
F. ${request.get(“com.example.bean”).toString()}
A. ServletResponse.encodeURL
B. HttpServletResponse.encodeURL
C. ServletResponse.encodeRedirectURL
D. HttpServletResponse.encodeRedirectURL
What is the result when a request is sent to MyServlet?()
A. An IllegalStateException is thrown at runtime.
B. An InvalidSessionException is thrown at runtime.
C. The string “value=null” appears in the response stream.
D. The string “value=myAttributeValue” appears in the response stream.
最新试题
A developer is designing a web application which extensively uses EJBs and JMS. The developer finds that there is a lot of duplicated code to build the JNDI contexts to access the beans and queues. Further, because of the complexity, there are numerous errors in the code. Which J2EE design pattern provides a solution for this problem?()
For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()
Which code snippet, inserted at line 8, causes the value Company to be output?()
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”);What is the result?()
Which the three EL expressions, inserted at line 15, are valid and evaluate to "3"? ()
Which the three interfaces need to be declared in the web application deployment descriptor? ()
Which three are guaranteed to be valid for the element of a web application deployment descriptor?()
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?()
Within the web application deployment descriptor, which defines a valid JNDI environment entry()
Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()