<%@ taglib uri= ”http://java./jsp/jstl/core ”prefix= ”c”%> <%int counter =10; %> <%@ taglib uri= ”http://java./jsp/jstl/core ”prefix= ”c”%> <%int counter =10; %>

全文预览

JavaEE期末习题集

上传者:hnxzy51 |  格式:doc  |  页数:16 |  大小:163KB

文档介绍
p1.jsp , 可以调用这个 JSP , 那么这个 JSP 的输出是()。<%@ page contentType="text/html; charset=GBK" %> <%@ taglib uri= ”http://java./jsp/jstl/core ”prefix= ”c”%> <html> <body> <%int counter =10; %> <c:if test= ”${counter%2==1} ”> <c:set var= ”isOdd ”value= ”true ”></c:set> </c:if> <c:choose> <c:when test= ”${isOdd==true} ”>it ’sanodd </c:when> <c:otherwise>it ’saneven </c:otherwise> </c:choose> </body> </html> A.一个 HTML 页面,页面上显示 it’s an odd B.一个 HTML 页面,页面上显示 it’s an even C.一个空白的 HTML 页面 D.错误信息 19. 给顶一个 JSP 程序源代码,如下: <jsp:include page="two.jsp" flush="true"> <jsp:param name="location" value="bejing"/> </jsp:include> 在two.jsp 中使用( )代码片段可以输出参数 location 的值。 A. <jsp:getParam name="location"> B. <jsp:getParameter name="location"> C. <%=request.getAttribute("location")%> D. <%=request.getParameter("location")%>

收藏

分享

举报
下载此文档