Airline Reservation System: Richa Singh 0812210091
Airline Reservation System: Richa Singh 0812210091
Introduction
It is a software application to assist an airline with transactions related to making ticket reservations, which includes booking, reserving and canceling tickets.The profile can also be used by the airline company to track user preferences and travel patterns to serve them better plan routes, for better marketing and efficient scheduling of all flights.
Requirement Analysis
Hardware
Intel Pentium III 450MHz or faster processor (or equivalent) Super VGA (800 x 600) or higher-resolution monitor with 256 colors Modem or Wireless Internet connection. 128MB RAM Monitor Keyboard Mouse
Software
Operating System: Windows 7, Windows Vista, Windows XP Service Pack 2,Apple Mac OS X 10.4.11+ (Intel-based) Browser: Internet Explorer 6 or above, Firefox 3 or above, Safari 3 or above, Chrome 4 or above. Microsoft Silverlight. Net Beans 6.9 J2EE Struts(DAO based) MySQL
Modules Description
ADMINISTRATOR LOGIN MANIPULATION ON DATABASE ADD NEW FLIGHTS VERIFY USERS BANK ACCOUNTS
REGISTERED USER SERCH FOR FLIGHTS LOGIN CANCEL TICKET PAYEMENT (NET BANKING/CREDIT/DEBIT) UPDATE DETAILS ONLINE BOOKING
Introduction to Struts
What is Struts
Framework to develop web applications Based on MVC-Model 2 pattern Current release is 1.2.7 Developed in May 2000 and June 2001
Frameworks are reusable, semicomplete'' applications that can be applied to produce custom applications Frameworks are tested, proven software designs and implementations that reduce the cost, accelerate development speed and improve the quality of software
Provide developers with modular, reusable and extensible software components Modular frameworks reduce the time and effort and investment required to understand and maintain existing software
Contributes improvements in programmer productivity, as well as enhancing the quality, performance, reliability of the software. Reduces the cost of building and maintaining software
MVC was first introduced by SmallTalk The goal of the MVC design pattern is to separate the application object (model) from the way it is represented to the user (view) from the way in which the user controls it (controller) i.e. layer architecture.
The model provides a representation of the data to the components comprising the view. It also knows about all the operations that can be applied to transform the data. The view provides presentation services in the application, such as a data entry screen or a screen rendering a query result .
The controller is responsible for linking the view with the model. The controller can be thought of as the controlling influence on the state of the model. All paths of navigation in the application are channelled through the controller.
The Model 1 Architecture had the following features: JSPs handled HTTP requests. JSPs communicates with the data layer. Rendered the next page back to client.
MVC-Model 2
Java servlet to receive HTTP requests from browser Java servlet communicates with the data layer. JSPs are used for presentation only. Java servlet also renders the next
ActionForm
dispatch Business Logic Action
Business Layer
Browser forward
create/set
Resource Bundle
Model JavaBean
Http Response
View JSP
get
The model is comprised of a combination of EJBs, Java Beans, and a set of Java classes extending the Struts base class ActionForm The view is represented by JSPs. The controller is implemented by the Struts ActionServlet.
You can extend the controllers behavior by creating Action classes to trigger the execution of a user request.
Build the Model Components (ActionForm Class) Build the Controller Components (Action Class) Build the View Components (JSPs) Create the struts-config file Update the web.xml file
Building an ActionForm
The ActionForm (also called the form) is a data holder that contains the data entered trough an HTML form. The form should also contain the get & set methods for each property. The form may also implement a validate method to perform data entry validations before actually performing the requested action. To create a form, you will need to extend the class org.apache.struts.action.ActionForm
Building an ActionServlet
ActionServlet is used to control the request and send the appropriate response to that request. It transforms request parameters into ActionForm There is only one ActionServlet in the application. Package is used
org.apache.struts.action.ActionServlet
Building a JSP
To create a JSP using Struts you will use the tag libraries provided by the Struts Framework. struts-logic.tld : This tag library contains tags that are useful in managing conditional generation of output text, looping over object collections for repetitive generation of output text, and application flow management. struts-html.tld : This taglib contains tags used to create struts input forms, as well as other tags generally useful in the creation of HTMLbased user interfaces.
To allow for better reusability, all components in Struts are loosely coupled. To integrate the components you must create a config file (struts-config.xml) Within this file youll define the actionmappings and form-beans. The action-mappings tell the ActionServlet which action classes to include within the application. The form-beans define the ActionForm classes required within the application.
Struts framework
Web.xml
Login.jsp
Struts-config.xml
Loginform.java
loginAction.java
Output
thankYou!