当前位置:java工程师信产部认证考试题库

问题:

[单选]

在J2EE中,在Servlet1中的doGet和doPost方法中只有如下代码: 
request.setAttribute("jb","aptech"); 
response.sendRedirect("http://localhost:8080/servlet/Servlet2"); 
那么在Servlet2中使用()可以把属性jb的值取出来。 

A . String str=request.getAttribute("jb");
B . String str=(String)request.getAttribute("jb");
C . Object str=request.getAttribute("jb");
D . 取不出来

在安全生产中的“十防”内容是什么? 瞳距仪测瞳距的范围和电源分别为()。 60-82mm;DC6V。 65-82mm;DC6V。 46-82mm;DC6V。 46-82mm;AC220V。 在J2EE中,对于以下ServletConfig的描述,正确的是()。 一旦servlet被实例化后,包容器把一个ServletConfig类型的对象传送给init()方法。 可以使用Servlet的getServletConfig()方法返回ServletConfig对象。 ServletConfig对象的方法getInitParameter(name)返回初始化参数name的值,初始化参数一般定义在web.xml中。 ServletConfig对象的方法getServletName()方法返回在web.xml中的元素的值。 工作票签发人的责任是什么? 从现代农业的内涵和本质来看,现代农业具有哪些主要特征?

在J2EE中,在Servlet1中的doGet和doPost方法中只有如下代码: 
request.setAttribute("jb","aptech"); 
response.sendRedirect("http://localhost:8080/servlet/Servlet2"); 
那么在Servlet2中使用()可以把属性jb的值取出来。 

参考答案:

  参考解析

本题暂无解析

在线 客服