ImageVerifierCode 换一换
格式:DOCX , 页数:8 ,大小:24.34KB ,
资源ID:21095570      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/21095570.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(外文翻译基于JavaServer Faces技术的酒店预订系统Word文档下载推荐.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

外文翻译基于JavaServer Faces技术的酒店预订系统Word文档下载推荐.docx

1、To search and to book hotel rooms.Tonotify of every event related to a user by sending the email on a given address during the registration process.To support definition process of each component of the hotel. The components of the hotel are: rooms,promotions, packages, discounts and se rvices.To co

2、mplete the reservation process by notifying the system about the fact that the guest came to the hotel and received keys to the booked room.II. JAVASERVER FACESThe user graphical interface is a crucial part of every computer programme with regard to its responsibility for interaction with the users.

3、 This part of application should be flexible,which means susceptible to any needed changes and without any doubts, user friendly. Regrettably, process of developing such user interface in the main requires usually a profusion of developers work and time, making the whole development process involved

4、 and onerous.The most apting technology to this field is JavaServer Faces (JSF). This holistic, component-based solution for longstanding problems facing software developers has a specific goal: to make web development faster and easier by masking a lot of complexities hidden behind this kind of pro

5、gramming.JSF technology is a server-side user interface framework for Java technology-based web applications. The main components of JSF technology are as follows: Two JavaServer Pages custom tags library for expressing UI components within a JSP page and for wiring components to server-side objects

6、.The user interface created with JSF technology (represented by myUI on the Fig. 1) runs on the server and renders back to the client (in this case the browser).Because web-based applications, must often appease multiple clients (such as desktop browsers, cell phones, and PDAs),JSF has a powerful ar

7、chitecture for displaying components in different ways. As for the browsers, for which JSF is mostly used, the default rendering technology is HTML 4.0, though the others like WML or SVG are also possible.One of the greatest advantages of JSF technology is that it offers a clean separation between b

8、ehavior and presentation layers.III. SPRING FRAMEWORKSpring is a lightweight, inversion of control container, created to address the complexity of enterprise application development.Spring makes possible to use plain JavaBeans to achieve things that were previously only possible with EJBs 10,11.Any

9、Java application can benefit from Spring in terms of simplicity, test-ability, and loose coupling. The Spring Framework contains a lot of features, which are well-organized in seven modules.When taken as a whole, these modules give everything that is needed to develop enterprise applications, althou

10、gh there is no must to build the application fully on the Spring framework. One can pick and choose only those modules that suit best to the application and ignore the rest. This strategy was chosen for the Hotel Reservation System Since one of the core value propositions of the framework is that of

11、 enabling choice by not forcing one to apply any particular architecture, technology or methodology, Spring also provides convenient mechanisms for integration with number of third -party frameworks (also with JSF and iBatis).IV. APACHE IBATIS DATAMAPPERApache iBatis JDBC based Data Mapper provides

12、simple and flexible way to transport data between relational database and Java, .Net or Ruby application. Contrary to popular Hibernate library, iBatis does not directly tie classes to tables or fields to columns, but instead, it couples objects with results of stored procedures or SQL statements us

13、ing simple XML descriptor letting the developer to reach only for required data. The iBatis framework can map nearly any database to any object model and is very tolerant of legacy designs, or even bad designs.Simplicity is the main advantage of the iBatis over other frameworks.The Hotel Reservation

14、 System was primarily built upon JSF technology for the user interface along with auxiliary libraries Spring and iBatis. The application architecture is presented in Fig. 3.The composition of the system is modular. Each layer is separated with and appropriate interface layer. Such solution makes the

15、 architecture not only more error -resistant but also more flexible for changes. The presentation layer consists of the graphical user interface written in the JSF technology andunderlying backing beans objects. It communicates with the Service layer through the service interfaces.Service layer is t

16、he central business part of the system where, on the basis of the user input data, proper decisions are made. It also translates input data into explicit form understood for the Data access layer, with which communication takes place by means of Data access interface layer.The Data access layer coop

17、erates with Data Mapper layer and is responsible for data exchange with database.The Data Mapper layer talks via JDBC to database to ask required data. This is a layer where iBatis Data Mapper plays the main role.V. JSF - SPRING INTEGRATIONIn a nutshell, JSF Spring integration makes Spring managed b

18、eans visible as variables to JSF, just as if the Spring beans are configured as JSF managed beans.Before diving into the integration specifics of JavaServer Faces,the general integration step for any web framework must be set forth.All that need to be done, is to declare ContextLoaderListener in the

19、 standard JEE servlet web.xml deployment descriptor. This listener initializes the Springs WebApplicationContext that contains all of the business beans in the application. (Fig. 4).The second step in the integration between Spring and JSF is specific just for JSF. The key class used in this process

20、 isDelegatingVariableResolver. To configure this variable the faces-context.xml file must be edited. After opening tag tag must be added and within it the pointing to the Springs DelegatingVariable Resolver must be put. The example faces -config.xml file is presented in. The DelegatingVariableResolv

21、er delegates value lookups to the default resolver of the underlying JSF implementation, and then to Springs business context WebApplicationContext. This allows to easily inject dependencies into ones JSF-managed beans. Example of faces-config.xml file from Hotel RVI. JSF AND GETMETHOD.The JSF only

22、recommended method for sending input data from an online form to an application server is the POST method,though sometimes there is a strong need for use the GET method instead. In the Hotel Reservati on System the GET method is used during the registration process for bringing about user account ac

23、tivation.The common way to implement the GET method is to create a special filter which can manipulate the header or contents (or both) of a request or response.To put GET method into operation, in case of JavaServer Faces,the following algorithm must be fulfilled in the body of thefilter:1. Get par

24、ameters from the request.2. Create appropriate backing bean object accordingly to theview that will be used further.3. Store the backing bean object in the current session.4. Set changed JSF context as current.5. Create view and store it in the JSF context.6. Execute backing beans methods.The Hotel

25、Reservation System was also based on the Spring library, hence some changes to the raw algorithm were necessary.The foremost method for any filter is doFilter() where the proper filtration happens .public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain)throws IOExcept

26、ion,ServletException FacesContext facesContext =getFacesContext(request, response);if (facesContext != null)request.getRequestDispatcher(facesContext.getViewRoot().getViewId().forward(request, response);elsechain.doFilter(request, response);The doFilter method from GET filter implementation As it ma

27、y be seen on Fig. 6, an additional function implementing the presented algorithm was used to keep the source code clear and easy-to-read.Create appropriate backing bean object.Almost all backing beans from Hotel Reservation System have at least one property of Spring managed -bean origin. Because of

28、 that, it is necessary to set this property after backing bean object creation.WebApplicationContext wac =WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);RegisterService registerService =(RegisterService)wac.getBean(registerService);ConfirmBean confirmBean = new ConfirmBe

29、an();confirmBean.setRegisterService(registerService);Creating backing bean object and setting spring origin property.Getting Spring managed -bean object requires operating on Springs WebApplicationContext object that is initialised during the server start-up.Set changed JSFes context as current.When

30、 storing backing bean object in the session the whole Faces context becomes changed, therefore it must be set as current in order all modifications take place .FacesContextFactory contextFactory =(FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);LifecycleFactory lifecycleFactory =(LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);Lifecycle lifecycle =lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCL

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1