fielderrorcssStyle=”“/> 。
P(266)
44.Hibernate包括 SessionFactory 、 Session 、 Query和Criteria 、Transaction和Configuration5个核心接口。
P(268)
45.Hibernate框架提供的查询语言为 HQL ,相关的查询接口有 Query 和 Criteria 。
P(275)
46.Hibernate框架的主配置文件为hibernate.cfg.xml,对象关系映射配置文件为一系列
47.Spring容器相关的核心接口是 BeanFactory 和 ApplicationContext ,默认的配置文件是 applicationContext.xml 。
P(287)
48.Spring配置文件中的标记的常用属性有 id 、 class 和 scope 。
P(288)
49.Spring容器配置Bean的作用域包括 singleton 、 prototype 、 request 、session和globalsession五种。
P(288)
50.Spring提供了 设值注入 和 构造注入 两种依赖注入方式访问容器配置的Bean实例。
P(290)
51.使用Ext的Web页面需要引入 ext-all.css 、 ext-base.js 和 ext-all.js 3个Ext库文件。
P(322)
一单项选择
1J2EE中,()类的()方法用于创建对话。
(选择一项)
a)HttpServletRequest、getSession
b)HttpServletResponse、newSession
c)HtttpSession、newInstance
d)HttpSession、getSession
2给定一个Servlet的doGet方法中的代码片段,如下:
request.setAttribute(“name”,”zhang”);
response.sendRedirect(“http:
//localhost:
8080/servlet/MyServlt”)
那么在MyServlet中可以使用()方法把属性name的值取出来。
(选择一项)
a)Stringstr=request.getAttribute(“name”);
b)Stringstr=(String)request.getAttribute(“name”);
c)Objectstr=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”);
5.在J2EE中,以下对RequestDispatcher描述正确的是()。
(选择一项)
A.Jsp中有个隐含的对象diapatcher,它的类型是RequestDispatcher
B.ServletConfig有一个方法:
getRequestDispatcher可以返回RequestDipatcher对象
C.RequestDipatcher有一个方法:
forward可以把请求继续传递给别的Servlet或者JSP界面
D.JSP中有个隐含的默认对象request,它的类型是RequestDipatcher
6.在WEB应用程序的目录结构中,在WEB-INF文件夹外的文件为()。
(只选一项)
A..jsp文件
B..class文件
C..jar文件
D.web.xml文件
7.给定一个Servlet程序的代码片段,如下:
()
PublicvoiddoPost(HttpServletRequestrequest,HttpServletResponseresp