填空题
有如下代码------demo.jsp----<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><html><title>测试</title><body><%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);%></body></html>------demo1.jsp----<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><html><title>MyJSP'demo.jsp'startingpage</title><body>info1:${pageScope.info}<br>info2:${info}<br>info3:${sessionScope.info}<br>info4:${applicationScope.info}</body></html>在demo1.jsp页面输出显示的结果是:(1)在当前浏览器上的另一个标签,直接浏览demo1.jsp,在demo1.jsp页显示输出( 2 )这时打开另一浏览器,直接浏览demo1.jsp,在demo1.jsp页显示输出( 3 )
填空题
有如下代码------demo,jsp------<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><html> <title>测试</title> <body> <% 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 </body></html>------demo1.jsp----<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><html> <title>My JSP 'demo.jsp' starting page</title> <body> info1:${pageScope.info }<br> info2: ${info }<br> info3:${sessionScope.info }<br> info4:${applicationScope.info } </body></html>当点击超级连接 demo1 时,在demo1.jsp页显示输出( 1)在当前浏览器上的另一个标签,直接浏览demo1.jsp,在demo1.jsp页显示输出( 2 )这时打开另一浏览器,直接浏览demo1.jsp,在demo1.jsp页显示输出( 3 )
套餐购买该问题答案仅对会员开放,欢迎开通会员 ¥ 19.9
0.64/天
1个月(不限次)
¥ 19.9
1000次
(不限时)
¥ 29.9
0.32/天
3个月(不限次)
¥ 59.9
0.16/天
1年(不限次)
立即支付