37) 38) 39) 40)
下列那一种情况会导致session中止()。(多选) a) 一直没有收到用户的请求,session超时 b) 用户关闭浏览器窗口 c) Servlet明确中止Session d) 客户端发出KILL-SESSION请求 下面的什么方法可以销毁Session()(单选)。
session.invalidate() a)
session.destroy() b)
session.end() c)
session.close() d)
下面的什么方法确保Session对象永远不会被容器自动中止()(单选)。
session.setTimeOut(0) a)
session.setTimeOut(-1) b)
session.setTimeOut(Integer.MAX_VALUE) c)
session.setTimeOut(Integer.MIN_VALUE) d)
思考下面的代码:
<%! int aNum=5 %>
The value of aNum is <%= aNum %> 下面描述正确的是()(单选) a) 将会打印出“The value of aNum is 5” b) 声明错误,将会发生编译时错误 c) 会发生执行期错误 d) 没有错误,也没有任何输出
下面的什么方法是JSP引擎所定义的()(单选)。
jspInit() a)
_jspService() b)
_jspService(ServletRequest, ServletResponse) c)
_jspService(HttpServletRequest, HttpServletResponse) d)
下面不是JSP隐式对象的是()(单选)。
- 11 -
c) d) 不能使用URL重写
不能明确地设置session 超时
41) 42)
43) 44) 45) 46)
a) b) c) d)
application session exception Cookie
JSP隐式对象Config对应Servlet的什么类()(单选)
javax.servlet.PageConfig a)
javax.servlet.jsp.PageConfig b)
javax.servlet.ServletConfig c)
javax.servlet.ServletContext d)
JSP的指令有()(多选)。
a) Page指令 b) Include指令 c) Taglib指令 d) useBean指令
下面的JSP标签,哪一项可以在请求时用于将其他JSP页面输出包含到目前页面()(单选)。
<%@ include %> e)
在请求时,如果要将user=mary的查询字符串传递给被包含的JSP。下面
正确的代码是()(单选)。
- 12 - e) 47) 48) 49) 50) 下面选项中与下列代码等义的是()(单选)。 RequestDispatcher rd = request.getRequestDispatcher(\ rd.forward(request, response); <%@ forward file=\d) <%@ forward page=\e) 下面那个方法可以用在EL函数中()(单选)。 public static expFun(void) a) expFun(void) b) private expFun(void) c) public expFun(void) d) public native expFun(void) e) 下面哪一个是有效的 下面哪一项可以有效地获得Bean属性的值()(单选)。 - 13 -