网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

某JSP中有如下代码:

< %

pageContext.setAttribute( “a” , ” page ” );

request.setAttribute( “a” , ” request ” );

session.setAttribute( “a” , ” session ” );

application.setAttribute( “a” , ” application ” );

% >

有:${a}

则显示结果为:

A.page

B.request

C.session

D.application


参考答案

更多 “ 某JSP中有如下代码:pageContext.setAttribute( “a” , ” page ” );request.setAttribute( “a” , ” request ” );session.setAttribute( “a” , ” session ” );application.setAttribute( “a” , ” application ” );% >有:${a}则显示结果为:A.pageB.requestC.sessionD.application ” 相关考题
考题 在J2EE中,在aa.jsp中有行代码:%request.setAttribute(Co.,jb-aptech%request.setAttribute(Co.,jb-aptech);%在bb.jsp中有行代码:%out.println((String)request.getAttribute(Co.));%为了使得在bb.jsp中的如上代码可以显示jb-aptech”,可以使用()方法。A.在aa.jsp中使用formmethod=postaction=bb.jsp把请求提交到bb.jspB.在aa.jsp中使用jsp:forwardfile=bb.jsp/把页面重定向到bb.jspC.在aa.jsp中使用%response.sendRedirect(bb.jsp);%把页面重定向到bb.jspD.在aa.jsp中使用%@includefile=bb.jsp%包含页面bb.jspE.在aa.jsp中使用%config.getServletContext().getRequestDispatcher(/bb.jsp).forward(request,response);%把页面重定向到bb.jsp

考题 pageContext.setAttribute("user","tom");request.setAttribute("user","bob");显示"bob",则可以使用 A.{request.getAttribute("user")}B.{param.user}C.{user}D.{requestScope.user}

考题 Jsp中有如下代码:以下哪句代码可以正确显示”admin” A.${cookie.name}B.${cookie.name.value}C.${name}D.${name.value}

考题 test.jsp文件中有如下一行代码: <jsp:useBeanid=”user”scope=”【 】”class=”com.UserBean”> 补全括号中的代码。

考题 某JSP中有如下代码,浏览该页面显示结果为【 】 <%int a=5; request.setAttribute(“a”,”123”); session.setAttribute(“a”,”456”);%> <c:out value=${a}/>

考题 JSP脚本元素是JSP代码中最常用的元素,JSP的脚本元素包括:A.声明(Declaration)B.页面指令(page)C.表达式(Expression)D.脚本小程序(Scriptlet)

考题 在J2EE中,test.jsp文件中有如下一行代码:<jsp:useBean id=”user” scope=”____” type=”com.UserBean”/>,要使user对象在用户对其发出请求时存在,下划线中应填入()。A.applicationB.sessionC.requestD.Page

考题 test.jsp文件中有如下代码: <jsp:useBean id="info" scope="_____" class="bean.InfoBean"/> 要使info对象在Web Server关闭才会消失,下划线中应填入()A.pageB.requestC.sessionD.application

考题 在J2EE中,test.jsp文件中有如下一行代码: <jsp:useBean id=”user” scope=”____” type=”com.UserBean”/> 要使user对象在用户对其发出请求时存在,下划线中应填入()A.applicationB.sessionC.requestD.page