1000 Projects
<<<Android Project Training's ( Online | Classroom)>>>

airline reservation system jsp project source code

June 23, 2012

This post gives sample code explanation for airline reservation cancellation page source code. The main aim of this java and jsp final year project is to provide reservation system for airlines in domestic and international airports.

copy the below cancellation.jsp page and save into airline reservation system main root folder.

package com;
import java.sql.*;
import java.io.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class CancellationAction extends org.apache.struts.action.Action

private final static String SUCCESS = "csuccess";
private final static String FAILURE = "cfailure";
public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception
ActionForward nextpage=null;
CancellationForm lg1Form = (CancellationForm) form;
String C_id = lg1Form.getCust_id();
String Fl_num = lg1Form.getFlight_num();
String Fl_name = lg1Form.getFlight_name();
String Org=lg1Form.getOrg();
String Dest=lg1Form.getDestination();
String Arv_Time=lg1Form.getArriv_time();
String Dep_Time=lg1Form.getDep_time();
// String S_num = lgForm.getSeat_num();

String c_id=null;
String fl_num=null;
String fl_name=null;
String av_tm=null;
String dep_tm=null;
String Org1=null;
String dest=null;
ResultSet rs=null;
Connection con=null;
Statement st=null;
try {


rs=st.executeQuery("insert into cancellation values('"+lg1Form.getCust_id()+"','"+lg1Form.getFlight_num()+"','"+lg1Form.getOrg()+"','"+lg1Form.getDestination()+"','"+lg1Form.getFlight_name()+"','"+lg1Form.getDep_time()+"','"+lg1Form.getArriv_time()+"','"+lg1Form.getSeat_num()+"')");
System.out.println("Values are inserted");

rs= st.executeQuery("select custid,flightnum,flightname,departure,arrival,orig,destination from reservation where custid='"+C_id+"' and flightnum='"+Fl_num+"'and flightname='"+Fl_name+"'and departure='"+Dep_Time +"'and arrival='"+Arv_Time+"'and orig='"+Org+"'and destination='"+ Dest+"'");

while (rs.next())
c_id =rs.getString("custid");
fl_num =rs.getString("flightnum");
fl_name =rs.getString("flightname");

catch(Exception e)


if(C_id.equals(c_id) &amp;&amp; Fl_num.equals(fl_num))

nextpage= mapping.findForward(SUCCESS);
nextpage= mapping.findForward(FAILURE);

return nextpage;


Download airline reservation system jsp project source code

The following two tabs change content below.
Hi, Find more on FB...

Latest posts by Ramesh Gavva/Kasarla shanthan (see all)

posted in CSE Projects with Source Code, Java Based Projects by Ramesh Gavva/Kasarla shanthan

Follow comments via the RSS Feed | Leave a comment | Trackback URL

‹‹‹ QUIVER Consistent Object Sharing For Edge Services Java Project Database

airline reservation system jsp project ›››

Custom Search

2 Comments to "airline reservation system jsp project source code"

  1. kranti lahire wrote:

    this had helped me alot for my project on java..

  2. rk wrote:

    What are the tables required to be built in this project?

Leave Your Comment

Copyright 2014 | Powered by 1000Projects.org | Developed by WikiHands.