![](https://lstatic.shangxueba.com/jiandati/h5/images/m_q_title.png)
[单选题]
在JavaWeb应用程序中,给定servletA的代码片段如下所示:PublicvoiddoPost(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{Stringid=”kingdom”;_________________}ServletB与servletA同在一个有效的会话范围内,当把请求转发给servletB后,要使B能够获得”kingdom”值,下划线处应填入()
A.request.getSession().getParameter(“ID”,id)
B.request.getSession().getAttribute(“ID”,id)
C.request.getSession().setAttribute(“ID”,id)
D.request.getSession().setParameter(“ID”,id)
提问人:网友罗琼
发布时间:2022-01-07