对如下JSP代码说法正确的是().
<%
Sringstr=”Hello.JBIT!”;
session.setAttribute(“msg’,str);
StringgetStr=session.getAttribute(“msg”);
out.println(getStr);
%>
<%
Sringstr=”Hello.JBIT!”;
session.setAttribute(“msg’,str);
StringgetStr=session.getAttribute(“msg”);
out.println(getStr);
%>
举一反三
- 对如下JSP 代码说法正确的是(). <% Sring str = ”Hello....println(getStr); %>
- 现在session中没有任何属性,阅读下面JSP中的代码,将输出() <% out.println(session.getAttribute("svse ")); %>
- 某JSP中有如下代码:<%pageContext .setAttribute("a","page");request.setAttribute("a","request");session.setAttribute("a","session");application.setAttribute("a","application");%>结果:${a}则显示结果为:( ) A: page B: session C: application D: request
- 在11.jsp中有下述代码:%request.setAttribute(x,JSP);session.setAttribute(x,JSP);response.sendRedirect(22.jsp);%22.jsp代码如下:%out.println(request.getAttribute(x));out.println(session.getAttribute(x));%在IE中访问11.jsp后的输出是______。
- 某JSP中有如下代码:request.setAttribute("a","request");session.setAttribute("a","session");application.setAttribute("a","application");%>有:${a}则显示结果为:_________________。 A: page B: request C: session D: application