题目内容

scope=”Application”表示JavaBean 可以表示当服务器关闭时,( )

查看答案
更多问题

有如下代码------demo.jsp----<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%>测试<%pageContext.setAttribute("info","page");request.setAttribute("info","request");pageContext.setAttribute("info","request2",pageContext.REQUEST_SCOPE);session.setAttribute("info","session");pageContext.setAttribute("info","session2",pageContext.SESSION_SCOPE);application.setAttribute("info","app");pageContext.setAttribute("info","app2",pageContext.APPLICATION_SCOPE);%>------demo1.jsp----<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%>MyJSP'demo.jsp'startingpageinfo1:${pageScope.info}
info2:${info}
info3:${sessionScope.info}
info4:${applicationScope.info}在demo1.jsp页面输出显示的结果是:(1)在当前浏览器上的另一个标签,直接浏览demo1.jsp,在demo1.jsp页显示输出( 2 )这时打开另一浏览器,直接浏览demo1.jsp,在demo1.jsp页显示输出( 3 )

有如下代码------demo,jsp------<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>测试<% pageContext.setAttribute("info","page"); request.setAttribute("info","request"); pageContext.setAttribute("info","request2",pageContext.REQUEST_SCOPE); session.setAttribute("info","session"); pageContext.setAttribute("info","session2",pageContext.SESSION_SCOPE); application.setAttribute("info","app"); pageContext.setAttribute("info","app2",pageContext.APPLICATION_SCOPE); %>demo1.jsp------demo1.jsp----<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>My JSP 'demo.jsp' starting page info1:${pageScope.info }
info2: ${info }
info3:${sessionScope.info }
info4:${applicationScope.info } 当点击超级连接 demo1 时,在demo1.jsp页显示输出( 1)在当前浏览器上的另一个标签,直接浏览demo1.jsp,在demo1.jsp页显示输出( 2 )这时打开另一浏览器,直接浏览demo1.jsp,在demo1.jsp页显示输出( 3 )

客户的重定向可以使用response的SencodeRedirect()方法来实现

A. 对
B. 错

JSP内置对象response调用方法getoutputStream()可以获得一个指向客户的 输出流,服务器将文件写入这个流,客户就可以下载文件了.

A. 对
B. 错

答案查题题库