聪明文档网

聪明文档网

最新最全的文档下载
当前位置: 首页> J2ee复习题2

J2ee复习题2

时间:2020-01-29 22:20:47    下载该word文档

1 J2EE 中,()类的()方法用于创建对话。(选择一项)

a) HttpServletRequestgetSession

b) HttpServletResponsenewSession

c) HtttpSessionnewInstance

d) HttpSessiongetSession

2 给定一个 Servlet doGet方法中的代码片段,如下:

request.setAttribute(name,zhang);

response.sendRedirect(http://localhost:8080/servlet/MyServlt)

那么在 MyServlet 中可以使用()方法把属性 name的值取出来。(选择一项)

a) String str=request.getAttribute(name);

b) String str=(String)request.getAttribute(name);

c) Object str=request.getAttribute(name);

d) 无法取出来

3.编写Servlet doPost方法时,需要抛出异常为()。(只选一项)

A.ServletException IOException

B.ServletException RemoteException

C.HttpServletException IOException

D.HttpServletException RemoteException

4.以下()可用于检索session属性userid的值。(只选一项)

A.session. getAttribute (userid);

B.session. setAttribute (userid);

C.request. getParameter (userid);

D.request. getAttribute (userid);

免费下载 Word文档免费下载: J2ee复习题2

  • 29.8

    ¥45 每天只需1.0元
    1个月 推荐
  • 9.9

    ¥15
    1天
  • 59.8

    ¥90
    3个月

选择支付方式

  • 微信付款
郑重提醒:支付后,系统自动为您完成注册

请使用微信扫码支付(元)

订单号:
支付后,系统自动为您完成注册
遇到问题请联系 在线客服

常用手机号:
用于找回密码
图片验证码:
看不清?点击更换
短信验证码:
新密码:
 
绑定后可用手机号登录
请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系 在线客服