首页 外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology

外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology

举报
开通vip

外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology 毕业设计 外文文献原文及译文 Hotel Reservation System Based on the Java Server Technology 基于Java Server Faces技术的酒店预订系统 学生姓名: 学号: 计算机系 系 别: 计算机科学与技术 专 业: 指导教师: 2015年 5 月 中北...

外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology
外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology 毕业设计 外文文献原文及译文 Hotel Reservation System Based on the Java Server Technology 基于Java Server Faces技术的酒店预订系统 学生姓名: 学号: 计算机系 系 别: 计算机科学与技术 专 业: 指导教师: 2015年 5 月 中北大学信息商务学院2015届毕业设计外文文献原文及译文 Hotel Reservation System Based on the Java Server Technology This paper describes implementation of a web-based hotel reservation system which enables users to book hotel rooms by means of a web browser. The systems based on Java Server Faces technology in the presentation layer, Spring Framework in the service layer and IBATIS library for the data access layer. I. INTRODUCTION The Hotel Reservation System is a specific type of software that supports, often by means of a web browser, whole infrastructure of the hotel for which the system has been deployed. Its key features are listed below:To search and to book hotel rooms.Technology 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 services.To complete 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 FACES The user graphical interface is a crucial part of every computer programmer with regard to its responsibility for interaction with the users. 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 developer's work and time, making the whole development process involved and onerous.The most technology to this field is Java Server 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 programming.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 Java Server Pages custom tags library for expressing UI components within a JSP page and for wiring components to server-side objects.The user interface created with JSF technology (represented by my UI on the Fig. 1) runs on the server and renders back to the 第 1 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 client (in this case the browser).Because web-based applications, must often appease multiple clients (such as desktop browsers, cell phones, and PD As),JSF has a powerful architecture 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 behavior and presentation layers. III. SPRING FRAMEWORK Spring is a lightweight, inversion of control container, created to address the complexity of enterprise application development.Spring makes possible to use plain Java Beans to achieve things that were previously only possible with EJB [10,11].Any 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, although 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 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 DATAMAPPER Apache IBATIS JDBC – based Data Mapper provides 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 using 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. 第 2 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 The Hotel Reservation 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 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 and underlying backing beans objects. It communicates with the Service layer through the service interfaces.Service layer is the 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 cooperates 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 INTEGRATION In a nutshell, JSF – Spring integration makes Spring managed beans visible as variables to JSF, just as if the Spring beans are configured as JSF managed beans.Before diving into the integration specifics of Java Server Faces,the general integration step for any web framework must be set forth.All that need to be done, is to declare Context Loader Listener in the standard JEE Servlet web.xml deployment descriptor. This listener initializes the Spring's Web Application Context 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 is Delegating Variable Resolver. 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 Spring's Delegating Variable Resolver must be put. The example faces -config.xml file is presented in. The Delegating Variable Resolver delegates value look ups to the default resolver of the underlying JSF implementation, and then going to the Spring's business context Web Application Context. This allows to easily inject dependencies into one's JSF-managed beans. Example of faces-config.xml file from Hotel RVI. JSF AND GETMETHOD.The JSF 第 3 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 only 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 Reserve on System the GET method is used during the registration process for bringing about user account activation.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 Java Server Faces,the following algorithm must be fulfilled in the body of the filter: 1. Get parameters from the request. 2. Create appropriate backing bean object accordingly to the view 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 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 do Filter() where the proper filtration happens . public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)throws IOException, ServletException { FacesContext facesContext = getFacesContext(request, response); if (facesContext != null){ request.getRequestDispatcher( facesContext.getViewRoot().getViewId()). forward(request, response); }else{ chain.doFilter(request, response); 第 4 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 } } The do Filter method from GET filter implementation As it may 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 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 ConfirmBean(); confirmBean. setRegisterService(registerService); Creating backing bean object and setting spring –origin property.Getting Spring managed -bean object requires operating on Spring's Web Application Context object that is in itialised during the server start-up.Set changed JSFes context as current.When 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. 第 5 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 DEFAULT_LIFECYCLE); facesContext = contextFactory. getFacesContext (servletContext, req,res, lifecycle); ProtectedFacesContext. setFacesContextAsCurrentInstance (facesContext); Setting JSF context as current Before the actual setting context into current, it is indispensable to grab Life cycle object. Life cycle manages the processing of the entire life cycle of a particular JSF request. It is responsible for executing all of the phases that have been defined by the JSF specification, in the specified order, unless otherwise directed by activities that occurred during the execution of each phase. An instance of Life cycle is created by calling the get Life cycle() method of Life cycle Factory, for a specified life cycle identifier. Because this instance is shared across multiple simultaneous requests, it must be implemented in a thread -safe manner. Using the current Life cycle object along with Servlet Context,Http Servlet Request and Http Servlet Response objects the Faces Context can be updated and becomes up to date. Create view and store it in the JSF context.After making Faces context actual, the new view is supposed to be created and added to this context, nevertheless it is not possible to do it with usage of 'new' operator, instead it has to be done in an indirect manner. UIViewRoot view = facesContext. getApplication(). getViewHandler(). createView(facesContext, "/confirm/register.jsp" ); facesContext.setViewRoot(view); Creating new view and string it in Faces context The create View() method of View Handler object constructs and return a new UI View Root instance initialized with information from the argument Faces Context and view Id . The viewed parameter is always String variable representing (relative to /WEB-INF/ directory) path where the definition file is 第 6 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 located.As shown in Fig. 9 the definition of the view is placed in ordinary JSP file and is located in sub directory of a WEB-INF directory.Executing backing beans methods The last step is the actual execution of methods of the underlying, proper to created view backing bean object. This example of the filter for the GET method was based upon one used in the Hotel Reservation System, which works as a registration confirmation tool, so in the end, the method of responsibility for the hotel management confirmation would be and should be invoked:confirm Bean.confirm Registration(user Id); VII. CONCLUSIONS The Hotel Reservation System is developed application designed accordingly to the modern programming trends with usage of technologies like Java Server Faces, Spring Framework and IBATIS Data Mapper. Its modular architecture makes the application more error-resistant and flexible for any changes therefore easy to add new functionality. The common problem of sending input data through the GET method has also been solved.System is easy to install and use and the three –module composition puts work-division pattern into operation.This research was supported by the Technical University of Lodz Grant K-25/1/2007/Dz.St. 第 7 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 Hotel Reservation System Based on the Java Server Technology 基于Java Server Faces技术的酒店预订系统 本文介绍了基于网络的酒店预订系统如何利用Java Server Faces技术和Spring框架访问系统通过Web浏览器为用户预定酒店客房。传统的酒店客房管理活动中,把人、才、物作为酒店客房的主要资源。但是随着社会化大生产的不断扩大和社会对产品多样化的需求,人们越来越重视信息在生产经营及酒店客房管理中的作用,并把它当做酒店客房管理的一种极其重要的资源,人们称之为“信息资源”,信息资源的处理已经成为当今世界上一项主要的社会活动。 一(引言 酒店预订系统是一个支持特定类型功能的软件,往往通过Web浏览器作为承载手段。其主要特点为寻找并发送一个在登记过程中给定的地址的电子邮件来预订酒店相应的房间。 为了支持各酒店的组件定义的过程。酒店的组成部分是:房间,促销,包装,折扣,完成的 通知 关于发布提成方案的通知关于xx通知关于成立公司筹建组的通知关于红头文件的使用公开通知关于计发全勤奖的通知 等有关的事实,客人来到酒店,并收到钥匙,以及房间预订系统预订的过程。 二(Java Server Faces 图形用户界面是每一个计算机程序的关键部分,其承载与用户的交互的责任。这应该是灵活的应用程序的一部分,这意味着容易因用户需求产生更改,但是无疑的可以增加用户友的好性。令人遗憾的是,发展中的主要过程需要好的用户界面,通常造成的是开发人员的工作和时间泛滥,并且使整个开发过程涉及Java Server Faces(JSF)这一领域的技术。这种整体的,基于构件的,软件开发人员所面临的长期问题的解决有一个具体的目标:使网站发展速度和复杂性掩盖了很多种类的技术。JSF技术更容易隐藏的是一个服务器的端用户对基于Java技术的Web应用程序界面框架。 JSF的技术的主要组成部分如下: 以UI组件为代表的并且管理他们,处理事件,执行服务器交互和数据转换,定义页面导航,支持国际和普及,并为所有这些功能提供扩可展性的技术支持。 两个Java Server Pages定制标记库在JSP页面表示UI组件和布线组件的服务器端的用户界面与JSF技术在服务器上运行,并返回客户端(在这种情况下浏览器)由于基于Web的应用程序。如桌面浏览器,手机和PDA(多个客户端),JSF的已经以不同的 第 8 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 方式展示了强大的组件体系结构。至于浏览器,因为它主要用于JSF,默认的渲染技术是HTML 4.0,尽管像其他的WML或SVG也有可能。JSF技术的最大优势之一是,它提供了一个干净的分离行为层和表示层和表示层的架构。 三(Spring框架 Spring是一个轻量级,控制反转容器,它的创建解决了企业应用发展.Spring的复杂性使得可以使用普通的Java Beans实现的东西,以前只可能与EJB的相关联。任何Java应用程序能够受益于Spring,简单来说,测试能力和松散的耦合。 当作为一个整体,这些模块提供的一切需要发展的企业来进行应用,虽然不一定要有充分的构建Spring框架的应用程序。人们可以从中挑选适合的模块,只有那些最好的应用,而忽略其他方面。这一战略是为酒店预订系统选择了自构框架的核心价值主张之一,并且是社会的选择方向,没有强迫任何一个适用于特定的架构,技术或方法,Spring还提供了与第三个数字一体化的便利机制 - 框架(也与JSF和IBATIS)。 四(IBATIS Data Mapper的APACHE IBATIS的JDBC在Apache - 数据库和Java基于数据映射器提供了简单和灵活的运输方式之间的关系,.Net或Ruby应用程序的数据。与流行的Hibernate库,IBATIS的并没有直接配合,以表或列或字段,而是,它的存储过程或使用简单的XML描述符开始的开发,以达到对所需数据的应用。产生只有SQL语句的结果对象。 IBATIS的框架几乎任何数据库可以映射到任何对象模型,是非常传统的设计,甚至坏 designs.Simplicity宽容,是与其他框架相比IBATIS的主要优点。 酒店预订系统,主要是建立基于JSF技术的同时辅助库,Spring与IBATIS的用户界面。应用程序体系结构,该系统的组成模块。每一层和适当的分隔与界面层。这种解决 方案 气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载 不仅能降低更多的错误发生可能性,也能产生更灵活的变化。表示层组成的图形用户在JSF支持bean对象技术编写的界面。它传达的是在那里,对用户输入数据的基础上,适当的决定是系统的核心业务的一部分,通过服务层。这也意味着为数据访问层明确了解的形式,而沟通需要通过数据访问接口是指数据访问层与数据输入数据映射层进行合作,并与数据库上进行数据交换的数据映射层负责通过JDBC数据库谈判要求所需的数据。这是一个在IBATIS的数据映射层起着主要作用。 五(JSF的Spring集成 概括地说,JSF的spring的整合使Spring管理类在JSF变量可见,就像spring 第 9 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 为JSF管理beans到Java Server Faces,任何Web框架综合集成一体化的具体步骤,必须配置forth.All需要做的事,是 标准 excel标准偏差excel标准偏差函数exl标准差函数国标检验抽样标准表免费下载红头文件格式标准下载 的J2EE Servlet的Context Loader Listener 的web.xml部署文件。这个监听器初始化Spring的Web Application Context的,它包含所有在应用程序的业务类。在spring和JSF之间的整合只是第二个步骤是具体为JSF。课堂上使用的关键在这个过程中。要配置这个变量在faces - context.xml文件必须被编辑。开幕后标签<应用程式必须加上标签,并在它的指向Spring的Delegating Variable分解必须付诸表决。这个例子的faces - config.xml文件。代表们的值查找到相关的JSF实现的默认解析器,然后到Spring的业务范围内的Web Application Context。这使得很容易注入一的JSF管理的bean依赖关系。 示例的faces-config.xml文件从酒店冗余接点JSF只建议应用的一个利用 表格 关于规范使用各类表格的通知入职表格免费下载关于主播时间做一个表格详细英语字母大小写表格下载简历表格模板下载 获取输入数据到应用服务器的方法是POST方法,虽然有时也有一种强烈的需要使用GET方法,但却不常用。在关于酒店系统使用GET方法是在有关用户帐户带来共同的方式来实施登记过程中使用GET方法是创建一个特殊的过滤器,可以操纵头或内容(或两者)的请求或付诸实施的GET方法在Java Server Faces的,下面的算法的情况下,必须在过滤器下应用: 1.从请求参数。 2.建立适当的支持bean的相应的对象认为将继续使用。 3.存储在本届会议上支持bean的对象。 4.设置更改为当前JSF上下文。 5.创建视图和存储它在JSF上下文。 6.支持bean的方法执行。 六(具体配置文件 酒店预订系统也基于Spring库,因此一些原始算法变化后成为了在适当过滤情况下的最适当方法。在do Filter方法的GET由于从上图可以看到过滤器的执行情况。额外的函数执行该算法被用于保持源代码的清晰和易于创造适当类从酒店预订系统的所有支持的类都应该至少有一个spring的财产托管bean。由于这个原因,有必要支持的bean对象后,设置创建此属性。 支持创建对象和设置spring托管bean的对象需要在Spring的Web Application 第 10 页 共 11 页 中北大学信息商务学院2015届毕业设计外文文献原文及译文 Context的对象,它是在启动up.Set改为current.支持存储在会话Bean对象JSF整个服务器初始化经营范围面临环境变得改变,因此它必须设置,以便与目前发生的所有修改。 JSF的设置作为当前的实际环境中之前将目前的情况下,它是不可或缺的攫取生命周期的对象。生命周期管理的特定JSF请求的整个生命周期处理。它负责执行的已经由JSF规范中定义的阶段,在指定的顺序,所有负责任的,除非另有活动,在每个阶段的执行导演发生。生命周期的一个实例是创建调用get Life cycle()的Life cycle Factory 方法,为一个指定的生命周期标识符。因为这种情况是在多个并发请求共享的,它必须是在一个线程安全的方式实现。利用当前的生命周期随着Servlet Context的对象,Http Servlet Request和Http Servlet Response对象的Faces Context中可以更新,成为最新的。 创建意见,并在JSF决策方面面临的实际context.After储存,新的看法应该是创建并添加到这个方面,但它是被可以做到“新”的运营商使用它,它反而要以间接方式进行。 创建新的观点和广泛的在工作面范围内的Create View的()的方法,它构造的View Handler对象并返回一个新的UI View Root实例资料和论据Faces Context中的view Id初始化。该效果参数始终是String变量代表(相对的/ WEB INF /目录)路径定义文件如图所示located。视图的定义是放置在普通的JSP文件,并在一个WEB INF文件目录测试支持bean方法的最后一步是位于子目录中的底层,以创造适当的支持bean的方法的实际执行对象的看法。这对于GET方法过滤的例子是基于在酒店预订系统,它作为一个工程的注册确认工具之一,所以最后,该方法负责确认应被调用(user Id的)。 七(结论 酒店预订系统,开发相应的设计与Java Server Faces的一样,Spring框架和IBATIS数据映射技术的使用现代编程应用的趋势。它的模块化结构使应用程序更多的错误性和灵活的任何变化,因此容易地添加新的功能。派遣通过GET方法还solved.System输入数据常见的问题是易于安装和使用,这三个模块组成放入operation.这个研究工作分工格局是由罗兹大学授予的K - 25/1/2007/Dz.St技术支持的。 第 11 页 共 11 页
本文档为【外文文献-基于Java Server Faces技术的酒店预订系统Hotel Reservation System Based on the Java Server Technology】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_180829
暂无简介~
格式:doc
大小:49KB
软件:Word
页数:17
分类:生活休闲
上传时间:2017-09-30
浏览量:197