单项选择题
Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()
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”);
相关考题
-
多项选择题
Whichthe twoaboutWARfilesaretrue?()
A. WAR files must be located in the web application library directory.
B. WAR files must contain the web application deployment descriptor.
C. WAR files must be created by using archive tools to designed specifically for that purpose.
D. The web container must serve the content of any META-INF directory located in a WAR file.
E. The web container must allow access to resources in JARs in the web application library directory -
多项选择题
Inwhichthreedirectories,relativetoawebapplication’sroot,mayataglibrarydescriptorfileresidewhendeployeddirectlyintoawebapplication?()
A. /WEB-INF
B. /META-INF
C. /WEB-INF/tlds
D. /META-INF/tlds
E. WEB-INF/resources
F. /META-INF/resources -
多项选择题
Giventhatascopedattributecartexistonlyinauser’ssession,whichtwo,takenindependently,ensurethescopedattributecartnolongerexists?()
A. ${cart = null }
B. <c:remove var=”cart” />
C. <c:remove var=”${cart}” />
D. <c:remove var=”cart” scope=”session” />
E. <c:remove scope=”session”>cart</c:remove>
F. <c:remove var=”${cart}” scope=”session” />
G. <c:remove scope=”session”>${cart}</c:remove>
