The JSP developer wants a comment to be visible in the final output to the browser. Which comment styleneeds to be used in a JSP page?()
A.<!-- this is a comment --> B.<% // this is a comment %> C.<%-- this is a comment --%> D.<% /** this is a comment **/ %>
多项选择题Whichtwoarevalidandequivalent?()
A.<%! int i; %> B.<%= int i; %> C.<jsp:expr>int i;</jsp:expr> D.<jsp:scriptlet>int i;</jsp:scriptlet> E.<jsp:declaration>int i;</jsp:declaration>
多项选择题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
多项选择题Giventhatascopedattributecartexistsonlyinauser’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>
多项选择题Given in a single JSP page: <%@ taglib prefix=’java’ uri=’myTags’ %> <%@ taglib prefix=’JAVA’ uri=’moreTags’ %> Which two are true?()
A.The prefix ’java’ is reserved. B.The URI ’myTags’ must be properly mapped to a TLD file by the web container. C.A translation error occurs because the prefix is considered identical by the web container. D.For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.
单项选择题Whichinterfacemustasessionattributeimplementifitneedstobenotifiedwhenawebcontainerpersistsasession?()
A.javax.servlet.http.HttpSessionListener B.javax.servlet.http.HttpSessionBindingListener C.javax.servlet.http.HttpSessionAttributeListener D.javax.servlet.http.HttpSessionActivationListener