Servlet中,处理客户端发出的表单数据请求应使用的接口及定义的方法是( )。
A. HttpServlet doHead
B. HttpServlet doPost
C. ServletRequest doGet
D. ServletRequest doPost
查看答案
当浏览器第二次访问以下jsp页面时输出结果是()<%! int a=1;%><% int b=2; a++; b++;%>
a=<%=a%> b=<%=b%>
A. a=1 b=2
B. a=2 b=2
C. a=2 b=3
D. a=3 b=3
需要删除Session中某一个key,可以调用下面那个方法()
A. remove(“key”)
B. removeAttribute(“key”)
C. Invalidate()
D. Logout()
以下代码能否编译通过,加入能编译通过,运行时候得到的输出结果为();<% request.setAttribute(“count”,new Integer(“0”));Integer count=request.getAttribute(“count”);%><%=count%>
A. 编译不通过
B. 可以编译通过,输出0
C. 编译通过,但运算时抛出ClassCaseException
D. 可以编译通过,但运行错误