Bus Reservation System WebBased Apllication
Bus Reservation System WebBased Apllication
Bus Reservation System WebBased Apllication
INTRODUCTION
SYSTEM REQUIREMENT
Hardware Requirement
Hard disk 250GB.
Color monitor.
Pentium Processor.
1GB RAM.
Laser printer
Software Requirement
Windows XP/Vista/7/8/8.1.
Eclipse 3.3.
Apache Tomcat server v5.5.
Internet explorer.
Google Chrome.
Mozilla Firefox.
TOOL DESCRIPTION
HTML
HTML is a computer language devised to allow website creation. These websites
can then be viewed by anyone else connected to the Internet. It is relatively easy to
learn, with the basics being accessible to most people in one sitting; and
quite powerful in what it allows you to create. It is constantly undergoing revision
and evolution to meet the demands and requirements of the growing Internet
audience under the direction of the organisation charged with designing and
maintaining the language.
The definition of HTML is Hypertext Mark-up Language.
Hypertext is the method by which you move around on the web by
clicking on special text called hyperlinks which bring you to the next page.
The fact that it is hyper just means it is not linear i.e. you can go to any
place on the Internet whenever you want by clicking on links there is no
set order to do things in.
Mark-up is what HTML tags do to the text inside them. They mark it as a
certain type of text (italicised text, for example).
HTML is a Language, as it has code-words and syntax like any other
language.
HTML consists of a series of short codes typed into a text-file by the site author
these are the tags. The text is then saved as an html file, and viewed through
a browser, like Internet Explorer or Netscape Navigator. This browser reads the
file and translates the text into a visible form, hopefully rendering the page as the
author had intended. Writing your own HTML entails using tags correctly to create
your vision. You can use anything from a rudimentary text-editor to a powerful
graphical editor to create HTML pages.
The tags are what separate normal text from HTML code. You might know them as
the words between the <angle-brackets>. They allow all the cool stuff like images
and tables and stuff, just by telling your browser what to render on the page.
Different tags will perform different functions. The tags themselves dont appear
when you view your page through a browser, but their effects do. The simplest tags
do nothing more than apply formatting to some text, like this:
Department of Computer Science NCJ
Cascading Stylesheets are used to control how your pages are presented, and
make pages more accessible. Basic special effects and interaction is provided
by JavaScript, which adds a lot of power to basic HTML. Most of this advanced
stuff is for later down the road, but when using all of these technologies together,
you have a lot of power at your disposal.
SQL SERVER
SQL is used to communicate with database .According to ANSI (American
National Standards Institute), it is the standard language for relation database
management systems .SQL statements are used to perform tasks such as such as
update data on a database, or retrieve data from a database.
SQLCMD is a command line application that comes with Microsoft SQL Server,
and exposes the management features of SQL Server. It allows SQL queries to be
written and executed from the command prompt. It can also act as a scripting
language to create and run a set of SQL statements as a script. Such scripts are
stored as a .sql file, and are used either for management of databases
T-SQL (Transact-SQL) is the Secondary means of programming and managing
SQL Server. It exposes keywords for the operations that can be performed on SQL
Server, including creating and altering database schemas, entering and editing data
in the database as well as monitoring and managing the server itself.
This project enables us to reserve a bus ticket where in a customer has been
provided with many facilities like choosing his/her own seats, destinations,
departure areas, type of buses at affordable rates. The administrator can have any
information regarding the bus reservations and cancellations.
Even a normal person can visit the website but can book
the tickets through the website.He/she can even cancel or
print the tickets from the website and book tickets with zero
booking charges and can get home delivery of the tickets.
Advantages
User Friendly: The user interface of the project is very simple. So the user
doesnt require any special training.
Module Description
Login: This module is much authorized where a admin can add new travels
or update the existing travels information and also check the booking details
so that he can issue the tickets on the doorstep.
Bus Details: This module provides the user to choose his/her from and to
destination with the date on which he/she will be travelling.
Booking details: In this module we have the details of the customer like
name, from and to destination, arrival time, departure time, departure areas,
the seat numbers, phone numbers and ticket fare.
Cancellations: This module is to cancel a tickets and the fare refund will be
made after some amount of deductions as per the travel management rules.
Printing ticket: This module is used to print the tickets where a user can
print his ticket when he pays through his debit/credit card.
Search: This module allows the user to view bus details and select the bus.
Booking: In this module the user enters his/her details to book the tickets.
USE-CASE
DIAGRAM
User
Admin
Searches for
buses
Add a new
Travels
Selects the
bus
Update any
existing travels
Fills details for
booking
View booking
details
Confirms the
booking
Print ticket
Cancel ticket
Table Description
Admin
User-id
Varchar(25)
pwd
Varchar(25)
Book Details
Ticketno
Date
ArrivalPlace
Noseats
Name
Gender
Age
E-mail
Phno
Address
Altphno
Landmark
City
Area
Pincode
Bus no
Amount
int
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
int
int
int
Bus
busno
Travel bus type
From1
To1
departure
arrival
duration
ratings
fare
seats
int
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
Varchar(45)
10
11
12
CODING
HOME.HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD
"http://www.w3.org/TR/html4/loose.dtd">
HTML
4.01
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Transitional//EN"
<script language="javascript">
function myfun()
{
var M=document.HFORM.NAME
var N=document.HFORM.TO
if((M.value=="") || (M.value==null))
{
alert("Enter City In From Field (Source)");
M.focus()
return false
}
else
if((N.value=="") || (N.value==null))
{
alert("Enter City In To Field (Destination)");
N.focus()
return false
}
return true
}
</script>
<title>Insert title here</title>
</head>
<body bgcolor="white" scrolling="auto">
<form action="search.jsp" name="HFORM" onSubmit="return myfun()">
<table width="900" height="1" border="0" align="center">
<tr>
<th><a style=color:blue href="home.html">Home</a></th>
<th><a style=color:blue href="print.html">Print Tickets</a></th>
<th><a style=color:blue href="cancel.jsp">Cancel Tickets</a></th>
<th><a style=color:blue href="aboutus.html">About Us</a></th>
<th>
Need Help?Call <b style=color:blue>Bangalore</b> <select name="phno">
<option>8904296377</option>
<option>9535389398</option>
<option>8553432070</option>
</select>
</th>
</tr>
</table>
Department of Computer Science NCJ
13
14
<th>
<table>
<tr>
<th><img src="D:\bus\images\dussehra.png"></th>
<th><img src="D:\bus\images\rbapp100.png"></th>
<th><img src="D:\bus\images\roundtrip.png"></th>
<th><img src="D:\bus\images\9ipRr76iE (144 x 144).jpg"></th>
</tr>
</table>
</th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<table align="left" border="0" width="350" height="400">
<tr>
<th><h4 style=color:#FF0000>Top Bus Routes</h4></th>
</tr>
<tr>
<td>Bangalore-Karwar</td><td>Bangalore-Hubli</td>
</tr>
<tr>
<td>Bangalore-Goa</td><td>Goa-Bangalore</td>
</tr>
<tr>
<td>Delhi-Manali</td><td>Hyderabad-Banagalore</td>
</tr>
<tr>
<td>Pune-Bangalore</td><td>Delhi-Lucknow</td>
</tr>
<tr>
<td>Bhubaneshwar-Hyderabad</td><td>Pune-Hyderabad</td>
</tr>
<tr>
<td>Chennai-Bangalore</td><td>Bhubaneshwar-Kolkata</td>
</tr>
<tr>
<td>Lucknow-Delhi</td><td>Bangalore-Chennai</td>
</tr>
<tr>
<td>Kolkata-Bhubaneshwar</td><td>Bangalore-Hyderabad</td>
</tr>
<tr>
<td>Manali-Delhi</td><td>Mumbai-Bangalore</td>
</tr>
</table>
<table align="right" border="0" width="350" height="400">
15
<tr>
<th><h4 style=color:#FF0000>Top Bus Routes</h4></th>
</tr>
<tr>
<td>Bangalore-Mumbai</td><td>Kerala-banagalore</td>
</tr>
<tr>
<td>Bangalore-Kerala</td><td>Karwar-banagalore</td>
</tr>
<tr>
<td>Bangalore-Belgaum</td><td>Hubli-bangalore</td>
</tr>
<tr>
<td>Belgaum-Bangalore</td><td>Bangalore-Mangalore</td>
</tr>
<tr>
<td>Mangalore-Bangalore</td><td>Bangalore-Mysore</td>
</tr>
<tr>
<td>Mysore-Bangalore</td><td>Bangalore-Udapi</td>
</tr>
<tr>
<td>Kolhapur-Bangalore</td><td>Bangalore-Ankola</td>
</tr>
<tr>
<td>Kolhapur-Belgaum</td><td>Belgaum-Goa</td>
</tr>
<tr>
<td>Kolhapur-Goa</td><td>Ankola-Bangalore</td>
</tr>
</table>
<table align="center" border="0" width="500" height="500">
<tr>
<th><h4 style=color:#FF0000>Top Bus Operators</h4></th>
</tr>
<tr>
<td>Vaibhav Travels(VOLVO A/C)</td><td>Naveen travels(VOLVO A/C)</td>
</tr>
<tr>
<td>Ameer Travels</td><td>Parshawanath travel PVT LTD. ...</td>
</tr>
<tr>
<td>SVR Tours And Travels</td><td>SRS Travels</td>
</tr>
<tr>
<td>VRL Travels</td><td>Orange Tours And Travels</td>
16
17
</tr>
<tr>
<td>Sharma Transport</td><td>Royal Cruiser</td>
</tr>
<tr>
<td>Paulo Travels</td><td>Kallada Travels(VOLVO A/C)</td>
</tr>
<tr>
<td>Universal Travels</td><td>Sugama Travels</td>
</tr>
<tr>
<td>Sea Bird Travels</td><td>Neeta Travels</td>
</tr>
<tr>
<td>KSRTC Airavat(VOLVO A/C)</td><td>Rajesh Travels</td>
</tr>
<tr>
<td>Durgamba Travels</td><td>K.P.N</td>
</tr>
</table>
</form>
<hr style=color:#D3D3D3 size="2px">
<p align="center" class="copy">2014 © BlueBus.com Designed By Vaibhav</p>
</body>
</html>
SEARCH.JSP
18
19
<th> <h2
style=color:#4169E1><b>To Change The Route Go Back To Home</b></h2></th>
</tr>
</table>
<table border="1" align="center" BGCOLOR="white">
<tr>
<th>
<table
align="center"
width="1000"
height="200"
cellspacing="30"
BORDERCOLOR="#000000">
<tr><th><u>
Bus
No</u></th><th><u>Travel(Bus
Type)</u></th><th><u>From</u></th><th><u>To</u></th><th><u>Departure</u></th><th><
u>Arrival</u></th><th><u>Duration</u></th><th><u>Ratings</u></th><th><u>Fare</u></th
><th><u>Available Seats</u></th><th><u>Book</u></th></tr>
<%
while(rt.next())
{
%>
<tr><td><input readonly="readonly" border="0" size="1" color="#000000" type="text"
name="Busno" value="<%=rt.getString("busno")%>"></td>
<td><input
readonly="readonly"
border="0"
size="25"color="#000000"
type="text"
name="Travelbustype" value="<%=rt.getString("travelbustype")%>"></td>
<td><input readonly="readonly" border="0" size="8" color="#000000" type="text"
name="From" value="<%=rt.getString("from1")%>"></td>
<td><input readonly="readonly" border="0" size="8" color="#000000" type="text" name="To"
value="<%=rt.getString("to1")%>"></td>
<td><input readonly="readonly" border="0" size="6" color="#000000" type="text"
name="Departure" value="<%=rt.getString("departure")%>"></td>
<td><input readonly="readonly" border="0" size="6" color="#000000" type="text"
name="Arrival" value="<%=rt.getString("arrival")%>"></td>
<td><input readonly="readonly" border="0" size="7" color="#000000" type="text"
name="Duration" value="<%=rt.getString("duration")%>"></td>
<td><input readonly="readonly" border="0" size="1" color="#000000" type="text"
name="Ratings" value="<%=rt.getString("ratings")%>"></td>
<td><input readonly="readonly" border="0" size="2" color="#000000" type="text"
name="Fare" value="<%=rt.getString("fare")%>"></td>
<td><input readonly="readonly" border="0" size="1" color="#000000" type="text"
name="Seats" value="<%=rt.getString("seats")%>"></td>
<td><input style=background:red style=color:white style=border-style:none type="submit"
name="Continue" value="Continue To Book"></td></tr>
<%
}
%>
20
</table>
</th>
</tr>
</table>
</body>
</html>
BOOKING.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="javascript">
function Validation()
{
var BP=document.frm.BP
var noseats=document.frm.noseats
var name1=document.frm.name1
var age=document.frm.age
var email=document.frm.email
var mobile=document.frm.mobile
var add=document.frm.address
var contact=document.frm.contact
var land=document.frm.landmark
var city=document.frm.city
var area=document.frm.area
var pin=document.frm.pincode
var dt=document.frm.date1;
if((dt.value=="") || (dt.value==null))
{
alert("Enter The Date Of Journey");
dt.focus()
return false
}
else
Department of Computer Science NCJ
if((BP.value=="") || (BP.value==null))
{
alert("Select The Bording Point");
BP.focus()
return false
}
else
if((noseats.value=="") || (noseats.value==null))
{
alert("Select Number Of Seats");
noseats.focus()
return false
}
else
if((name1.value=="") || (name1.value==null))
{
alert("Enter Your Name");
name1.focus()
return false
}
else
if((age.value=="") || (age.value==null))
{
alert("Enter Your Age");
age.focus()
return false
}
else
if(isNaN(age.value))
{
alert("Text Not Allowed In Age Field");
age.focus();
return false;
}
else
if((email.value=="") || (email.value==null))
{
alert("Enter Your E-mail ID ");
email.focus()
return false
}
else
if((mobile.value=="") || (mobile.value==null))
{
alert("Enter Your Mobile Number");
mobile.focus()
21
return false
}
else
if(isNaN(mobile.value))
{
alert("Text Not Allowed In Mobile Number Field");
mobile.focus();
return false;
}
else
if(mobile.value.length<10||mobile.value.length>10)
{
alert("Enter Correct 10 Digit Phone Number In Mobile Number Field");
mobile.focus();
return false;
}
else
if((add.value=="") || (add.value==null))
{
alert("Enter Your Home Address");
add.focus()
return false
}
else
if((contact.value=="") || (contact.value==null))
{
alert("Enter Your Alternate Contact Number");
contact.focus()
return false
}
else
if(isNaN(contact.value))
{
alert("Text Not Allowed In Alternate Contact Number Field");
contact.focus();
return false;
}
else
if(contact.value.length<10||contact.value.length>10)
{
alert("Enter Correct 10 Digit Phone Number Alternate Contact Number Field");
contact.focus();
return false;
}
else
if((land.value=="") || (land.value==null))
22
{
alert("Enter Your Nearest Landmark ");
land.focus()
return false
}
else
if((city.value=="") || (city.value==null))
{
alert("Enter Your City");
city.focus()
return false
}
else
if((area.value=="") || (area.value==null))
{
alert("Enter Your Area Name");
area.focus()
return false
}
else
if((pin.value=="") || (pin.value==null))
{
alert("Enter Your Pincode");
pin.focus()
return false
}
else
if(isNaN(pin.value))
{
alert("Text Not Allowed In Pincode Field");
pin.focus();
return false;
}
else
if(pin.value.length<6||pin.value.length>6)
{
alert("Enter Correct 6 Digit Pincode Number");
pin.focus();
return false;
}
return true
}
</script>
<title>Insert title here</title>
</head>
<body>
23
24
25
String available=request.getParameter("Seats");
String B=request.getParameter("Busno");
String F=request.getParameter("Fare");
%>
<td><input type="text" name="busno" value="<%=B %>" readonly="readonly"></td>
<td><input type="text" name="seats" value="<%=available %>" readonly="readonly"></td>
<td><input type="date" name="date1"></td>
<td><select name="BP">
<option></option>
<option value=Majestic>Majestic</option>
<option value=Jayanagar>Jayanagar 4th block</option>
<option value=Shantinagar>Shantinagar</option>
<option value=Brigade>J.P nagar(Brigade Millenium)</option>
<option value=BTM>B.T.M Layout</option>
</select>
</td>
<td><select name="noseats">
<option></option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
</select></td>
<td><input type="text" name="fare1" value="<%=F %>" readonly="readonly"></td>
</tr>
<tr>
<td><h3>Passenger Details</h3><hr style=color:#808080 size="5px"></td>
</tr>
<tr>
<td>Name</td>
<td>Gender</td>
<td>Age</td>
</tr>
<tr>
<td><input type="text" name="name1"></td>
<td><input type="radio" name="gender" value="M" checked="checked"> M
type="radio" name="gender" value="F"> F</td>
<td>
<input type="text" name="age"></td>
</tr>
<tr>
<td><h3>Contact Details</h3><hr style=color:#808080 size="5px"></td>
<input
26
</tr>
<tr>
<td>E-mail <input type="text" name="email"></td>
<td>Mobile <input type="text" name="mobile" value"+91"></td>
<tr>
<td><h3>Cash on Delivery</h3><hr style=color:#808080 size="5px"></td>
</tr>
</table>
<table width="500" height="300" align="center" border="1">
<tr>
<th>
<table width="500" height="300" align="center" border="0">
<tr>
<td> Home Address
<input type="text" name="address"></td>
</tr>
<tr>
<td>Alternate Contact No <input type="text" name="contact"></td>
</tr>
<tr>
<td> Landmark
<input type="text" name="landmark"></td>
</tr>
<tr>
<td> City
<input type="text" name="city"></td>
</tr>
<tr>
<td> Area  
;
<input type="text" name="area"></td>
</tr>
<tr>
<td> Pincode &n
bsp;
<input type="text" name="pincode"></td>
</tr>
<tr>
<td colspan="2">
27
<input style=background:red style=color:white
style=border-style:none type="submit"
name="Book" value="Confirm" onfocus="Validation()">
</td>
</tr>
</table>
</th>
</tr>
</table>
</body>
</html>
CONFIRM.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor=#EEE8AA>
<form action="last.jsp" method=post>
<%
String n1=request.getParameter("date1");
String n2=request.getParameter("BP");
String n4=request.getParameter("name1");
String n5=request.getParameter("gender");
String n6=request.getParameter("age");
String n7=request.getParameter("email");
String n8=request.getParameter("mobile");
String n9=request.getParameter("address");
28
String n10=request.getParameter("contact");
String n11=request.getParameter("landmark");
String n12=request.getParameter("city");
String n13=request.getParameter("area");
String n14=request.getParameter("pincode");
try
{
String NS=request.getParameter("noseats");
String BS1=request.getParameter("busno");
int BS2=Integer.parseInt(BS1);
String AS=request.getParameter("seats");
int AS1=Integer.parseInt(AS);
int NS1=Integer.parseInt(NS);
int X=AS1-NS1;
String F1=request.getParameter("fare1");
int F2=Integer.parseInt(F1);
int F3=NS1*F2;
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st1=con.createStatement();
int
rt=st1.executeUpdate("insert
into
bookdetails
(Date,Arrivalplace,Noseats,Name,Gender,Age,Email,Phno,Address,AltPhno,Landmark,City,Are
a,Pincode,busno,fare)
values('"+n1+"','"+n2+"','"+NS+"','"+n4+"','"+n5+"','"+n6+"','"+n7+"','"+n8+"','"+n9+"','"+n10+"'
,'"+n11+"','"+n12+"','"+n13+"','"+n14+"','"+BS2+"','"+F3+"')");
int rt2=st1.executeUpdate("update bus set seats='"+X+"' where busno='"+BS2+"'");
%>
<table align="center" height="500" width="500" cellspacing="20" background="yellow">
<tr>
<th>Bus Number</th>
<td><input type="text" name="bsno" value="<%=BS1%>" readonly="readonly"></td>
<th>Passanger Name</th>
<td><input type="text" name="pname" value="<%=n4%>" readonly="readonly"></td>
</tr>
<tr>
<th>E-mail ID</th>
<td><input type="text" name="eml" value="<%=n7%>" readonly="readonly">
<th>Phone Number</th>
<td><input type="text" name="cnt" value="<%=n8%>" readonly="readonly"></td>
</tr>
<tr>
<th>Number Of Seats</th>
Department of Computer Science NCJ
29
LAST.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="javax.xml.bind.ParseConversionEvent"%>
<%@page import="com.sun.corba.se.spi.ior.Writeable"%>
<%@page import="com.sun.corba.se.spi.ior.WriteContents"%>
<%@page import="javax.xml.bind.helpers.ParseConversionEventImpl"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
Transitional//EN"
30
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function C()
{
window.print();
}
</script>
</head>
<body>
<form name=frm>
<table width="900" height="1" border="0" align="center">
<tr>
<th><a style=color:blue href="home.html">Home</a></th>
<th><a style=color:blue href="print.html">Print Tickets</a></th>
<th><a style=color:blue href="cancel.html">Cancel Tickets</a></th>
<th><a style=color:blue href="aboutus.html">About Us</a></th>
<th>
Need Help?Call <b style=color:blue>Bangalore</b> <select name="phno">
<option>8904296377</option>
<option>9535389398</option>
<option>8553432070</option>
</select>
</th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<table bgcolor="white" width="900" height="40" align="center" border="0">
<tr>
<th><img src="D:\bus\images\th.jpg" align="right"><img src="D:\bus\images\Blue-Bus-Logo
(264 x 89).jpg" align="left"></th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<%
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st2=con.createStatement();
31
Statement st3=con.createStatement();
String BS=request.getParameter("bsno");
String Em=request.getParameter("eml");
ResultSet rt1=st2.executeQuery(("select * from bus b, bookdetails c where c.busno=b.busno and
b.busno='"+BS+"' and c.Email='"+Em+"'"));
while(rt1.next())
{
%>
<table>
<tr>
<th><h2 style=color:#4169E1><b>Your Ticket Booking Details Are</b></h2></th>
</tr>
</table>
<table
align="center"
width="1000"
height="200"
cellspacing="4"
BORDERCOLOR="#000000">
<tr>
<th>Bus Number</th>
<th><input style=border:hidden type="text" name="BSN" value="<%=rt1.getString("busno")
%>" readonly="readonly"></th>
<th>Ticket Number</th>
<th><input style=border:hidden type="text" name="TKN" value="<%=rt1.getString("Ticketno")
%>" readonly="readonly"></th>
</tr>
<tr>
<th>Travel(Bus Type)</th>
<th><input
style=border:hidden
type="text"
name="TR"
value="<
%=rt1.getString("travelbustype")%>" readonly="readonly"></th>
<th>Date</th>
<th><input style=border:hidden type="text" name="DT" value="<%=rt1.getString("Date")%>"
readonly="readonly"></th>
</tr>
<tr>
<th>From</th>
<th><input style=border:hidden type="text" name="FR" value="<%=rt1.getString("from1")%>"
readonly="readonly"></th>
<th>To</th>
<th><input style=border:hidden type="text" name="T" value="<%=rt1.getString("to1")%>"
readonly="readonly"> </th>
<th>Arrival Place</th>
<th><input
style=border:hidden
type="text"
name="AR"
value="<
%=rt1.getString("Arrivalplace")%>" readonly="readonly"></th>
</tr>
<tr>
<th>Departure</th>
<th><input style=border:hidden type="text" name="DP" value="<%=rt1.getString("departure")
%>" readonly="readonly"></th>
32
33
}
%>
<form action="home.html">
<table align="right" width="400" height="5">
<tr>
<th>
<input type="submit" name="finish" value="Finish">
</th>
</tr>
</table>
</form>
</body>
</html>
PRINT.HTML
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script languagee="javascript">
function val()
{
var ptext=document.f1.ptext
var pbusno=document.f1.pbusno
var Nme=document.f1.Nme
var Eid=document.f1.Eid
var Phn=document.f1.Phn
if((ptext.value=="") || (ptext.value==null))
{
alert("Enter Your Ticket Number");
ptext.focus()
return false
}
else
if((pbusno.value=="") || (pbusno.value==null))
{
alert("Enter Bus Number");
pbusno.focus()
return false
}
else
if((Nme.value=="") || (Nme.value==null))
{
alert("Enter Your Name");
Nme.focus()
return false
}
else
if((Eid.value=="") || (Eid.value==null))
{
alert("Enter Your E-mail ID ");
Eid.focus()
return false
}
else
if((Phn.value=="") || (Phn.value==null))
{
alert("Enter Your Contact Number");
Phn.focus()
return false
}
return true
}
</script>
<title>Insert title here</title>
</head>
<body bgcolor="white">
<form action="retrievenprint.jsp" name="f1" onSubmit="return val()" method="post">
<a style=color:blue href="home.html">Back</a>
<table width="900" height="1" border="0" align="center">
<tr>
<th><a style=color:blue href="home.html">Home</a></th>
<th><a style=color:blue href="print.html">Print Tickets</a></th>
<th><a style=color:blue href="cancel.jsp">Cancel Tickets</a></th>
<th><a style=color:blue href="aboutus.html">About Us</a></th>
<th>
Need Help?Call <b style=color:blue>Bangalore</b> <select name="phno">
<option>8904296377</option>
<option>9535389398</option>
<option>8553432070</option>
</select>
34
35
</th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<table bgcolor="white" width="900" height="40" align="center" border="0">
<tr>
<th><img src="D:\bus\images\th.jpg" align="right"><img src="D:\bus\images\Blue-Bus-Logo
(264 x 89).jpg" align="left"></th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<h1 style=color:blue align="center">Print Ticket</h1>
<table width="500" height="200" align="center" border="0" cellspacing="20">
<tr>
<th>Ticket
Number
</th><th><input
type="text"
name="ptext"></th><th>Bus
Number</th><th><input type="text" name="bsno"></th>
</tr>
<tr>
<th>Your
Name</th><th><input
type="text"
name="Nme"></th><th>E-mail
ID</th><th><input type="text" name="eml"></th>
</tr>
<tr>
<th>Phone Number</th><th><input type="text" name="Phn"></th>
</tr>
<tr>
<th><input
style="background:red;color:white;border-style:none;"
type="submit"
name="psubmit" value="Submit" onfocus="val()"></th>
</tr>
</table>
</form>
<hr style=color:#D3D3D3 size="2px">
<p align="center" class="copy">2014 © BlueBus.com Designed By Vaibhav</p>
</body>
</html>
RETRIEVENPRINT.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
"http://www.w3.org/TR/html4/loose.dtd">
<html>
Department of Computer Science NCJ
Transitional//EN"
36
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function C()
{
window.print();
}
</script>
</head>
<body>
<form name=frm10>
<table bgcolor="white" width="900" height="40" align="center" border="0">
<tr>
<th><img src="D:\bus\images\th.jpg" align="right"><img src="D:\bus\images\Blue-Bus-Logo
(264 x 89).jpg" align="left"></th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<%
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st2=con.createStatement();
Statement st3=con.createStatement();
String BS=request.getParameter("bsno");
String Em=request.getParameter("eml");
ResultSet rt1=st2.executeQuery(("select * from bus b, bookdetails c where c.busno=b.busno and
b.busno='"+BS+"' and c.Email='"+Em+"'"));
while(rt1.next())
{
%>
<table>
<tr>
<th><h2
style=color:#4169E1
align="center"><b>Your
Ticket
Booking
Details
Are</b></h2></th>
</tr>
</table>
<table
align="center"
width="1000"
height="200"
cellspacing="4"
BORDERCOLOR="#000000">
<tr>
<th>Bus Number</th>
<th><input style=border:hidden type="text" name="BSN" value="<%=rt1.getString("busno")
%>" readonly="readonly"></th>
<th>Ticket Number</th>
37
38
</tr>
<tr>
<th>Fare/seat</th>
<th><input style=border:hidden type="text" name="FR" value="<%=rt1.getString("fare")%>"
readonly="readonly"></th>
<th>Age</th>
<th><input style=border:hidden type="text" name="AG" value="<%=rt1.getString("Age")%>"
readonly="readonly"></th>
</tr>
<tr>
<th>E-Mail ID</th>
<th><input style=border:hidden type="text" name="EM" value="<%=rt1.getString("Email")
%>" readonly="readonly"></th>
<th>Phone Number</th>
<th><input style=border:hidden type="text" name="PH" value="<%=rt1.getString("Phno")%>"
readonly="readonly"></th>
</tr>
<tr>
<th>Pincode</th>
<th><input style=border:hidden type="text" name="PN" value="<%=rt1.getString("Pincode")
%>" readonly="readonly"></th>
</tr>
<tr>
<th>Amount Payable</th>
<th><input style=border:hidden type="text" name="AM" value="<%=rt1.getString("Fare")%>"
readonly="readonly"></th>
</tr>
</table>
<%
}
%>
</form>
<table align="right" width="400" height="1" border="0">
<tr>
<th>
<input type=button onclick="C()" value="print" align="center">
</th>
</tr>
</table>
</body>
</html>
CANCEL.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
Department of Computer Science NCJ
39
40
ctext5.focus()
return false
}
return true
}
</script>
<title>Insert title here</title>
</head>
<body bgcolor="white">
<form action="complete.jsp" name="f2" onSubmit="return vali()">
<a style=color:blue href="home.html">Back</a>
<table width="900" height="1" border="0" align="center">
<tr>
<th><a style=color:blue href="home.html">Home</a></th>
<th><a style=color:blue href="print.html">Print Tickets</a></th>
<th><a style=color:blue href="cancel.jsp">Cancel Tickets</a></th>
<th><a style=color:blue href="aboutus.html">About Us</a></th>
<th>
Need Help?Call <b style=color:blue>Bangalore</b> <select name="phno">
<option>8904296377</option>
<option>9535389398</option>
<option>8553432070</option>
</select>
</th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<table bgcolor="white" width="900" height="40" align="center" border="0">
<tr>
<th><img src="D:\bus\images\th.jpg" align="right"><img src="D:\bus\images\Blue-Bus-Logo
(264 x 89).jpg" align="left"></th>
</tr>
</table>
<hr style=color:#D3D3D3 size="2px">
<h1 style=color:blue align="center">Cancel Ticket</h1>
<table width="350" height="200" align="center" border="0" cellspacing="20">
<tr>
<th>Ticket
Number</th><th><input
type="text"
name="ctext1"></th><th>Bus
Number</th><th><input type="text" name="ctext2"></th>
</tr>
<tr>
41
42
</tr>
<tr>
<th>Your Name</th><th><input type="text" name="c3" value="<%=NN%>"></th><th>Email</th><th><input type="text" name="c4" value="<%=EM%>"></th>
</tr>
<tr>
<th>Phone Number</th><th><input type="text" name="c5" value="<%=PH%>"></th>
<th>No Of Seats</th><th><input type="text" name="c6" value="<%=rs5.getString("Noseats")
%>"></th>
</tr>
<tr>
<th>Arrival
Place</th><th><input
type="text"
name="c7"
value="<
%=rs5.getString("Arrivalplace")%>"></th>
<th>Date</th><th><input type="text" name="c8" value="<%=rs5.getString("Date")%>"></th>
</tr>
<tr>
<th>Age</th><th><input type="text" name="c9" value="<%=rs5.getString("Age")%>"></th>
<th>Gender</th><th><input type="text" name="c10" value="<%=rs5.getString("Gender")
%>"></th>
</tr>
<tr>
<th>Address</th><th><input type="text" name="c11" value="<%=rs5.getString("Address")
%>"></th>
<th>Total Amount</th><th><input type="text" name="c12" value="<%=rs5.getString("Fare")
%>"></th>
</tr>
<tr>
<th><input type="submit" name="cancel" value="Confirm And Proceed"></th>
</tr>
</table>
<%
}
%>
</form>
</body>
</html>
CANCEL1.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
43
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
String TN1=request.getParameter("c1");
String BN5=request.getParameter("c2");
String NO=request.getParameter("c6");
String EM1=request.getParameter("c4");
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st6=con.createStatement();
Statement st7=con.createStatement();
int rt2=st6.executeUpdate("update bus set seats=seats+'"+NO+"' where busno='"+BN5+"'");
int rt3=st7.executeUpdate("delete from bookdetails where Ticketno='"+TN1+"'
Email='"+EM1+"'");
%>
<h1><% out.println("Your Ticket Is Cancelled Successfully");%></h1>
</body>
</html>
and
ADMIN.HTML
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="javascript">
function myfunc1()
{
var x1=document.f3.uname;
var y1=document.f3.pwd;
if(x1.value==""||x1.value==null)
{
alert("Enter Username")
x1.focus();
return false;
}
Department of Computer Science NCJ
44
if(y1.value==""||y1.value==null)
{
alert("Enter Password")
y1.focus();
return false;
}
if(y1.value.length<7)
{
alert("password should be atleast 7 characters")
y1.focus();
return false;
}
return true;
}
</script>
<title>ADMIN PAGE</title>
</head>
<body bgcolor="white">
<img
src="D:\bus\images\Blue-Bus-Logo
(264
x
89).jpg"
align="left"><img
src="D:\bus\images\administrator.jpg" align="left"><br><br>
<h2 align=center style=color:grey>LOGIN</h2><br><br>
<form name=f3 action="inner.jsp">
<table border=0 align=center>
<tr>
<td style=color:blue>USER NAME</td>
</tr>
<tr>
<td><input id="txtId" type="text" name="uname"></td>
</tr>
<tr>
<td style=color:blue>PASSWORD</td>
</tr>
<tr>
<td><input id="txtPsw" type="password" name="pwd"></td>
</tr>
<tr>
<th colspan=2 align=center><input type="submit" name="sign" style=color:blue onclick="return
myfunc1()" value="LOGIN"></th>
</tr>
</table>
</form>
<br>
<br><br>
<br><br>
<br>
45
<br><br>
<br>
<br>
<br><br>
<br>
</body>
</html>
INNER.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a style=color:blue href="admin.html">Back</a>
<table bgcolor="white" width="500" height="16" align="left" border="0">
<tr>
<th><img src="D:\bus\images\administrator.jpg" align="left"></th>
</tr>
</table>
<h1 align="justify" style=color:red>Error Notification</h1>
<table bgcolor="white" width="500" height="20" align="left" border="0">
<tr>
<th><img src="D:\bus\images\Blue-Bus-Logo (264 x 89).jpg" align="center">
</th>
</tr>
</table>
<%
String name=request.getParameter("uname");
String name1=request.getParameter("pwd");
String qry;
qry="select uname,pwd from admin";
Class.forName("com.mysql.jdbc.Driver");
46
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery(qry);
int x=0;
while(rs.next())
{
String un=rs.getString(1);
String pd=rs.getString(2);
if(un.equalsIgnoreCase(name)&&pd.equalsIgnoreCase(name1))
{
%>
<jsp:forward page="update.jsp"></jsp:forward>
x=1;
<%
}
}
if(x==0)
{
%>
<h3 style=color:red align="center"><big>Your Not Authenticated For This Service.</big></h3>
<%
}
%>
</body>
</html>
UPDATE.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h4 align="right"><a style=color:blue href="admin.html">Log Out</a></h4>
<table bgcolor="white" width="500" height="15" align="left" border="0">
<tr>
Department of Computer Science NCJ
47
<th><img
src="D:\bus\images\Blue-Bus-Logo
(264
x
89).jpg"
align="left"><img
src="D:\bus\images\administrator.jpg" align="left"></th>
</tr>
</table>
<br><br><br>
<form action="new.jsp">
<table bgcolor="white" width="500" height="20" align="right" border="0">
<tr>
<th>Update For New Travels <input type="submit" name="new"
value="ADD NEW TRAVELS"></th>
</tr>
</table>
</form>
<br><br><br><br><br><br>
<form action="bframe.html">
<table bgcolor="white" width="500" height="20" border="0">
<tr>
<th>
Update For Existing Travels <input type="submit" name="new"
value="EDIT EXISTING TRAVELS"></th>
</tr>
</table>
</form>
</body>
</html>
NEW.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="javascript">
function valid()
{
var B1=document.frm1.Nbusno
var T1=document.frm1.Ntravelbustype
var F1=document.frm1.Nfrom
var T11=document.frm1.Nto
var D1=document.frm1.Ndept
var A1=document.frm1.Narr
var D11=document.frm1.Ndur
var R1=document.frm1.Nrate
var F11=document.frm1.Nfare
var S1=document.frm1.Nseats
if((B1.value=="") || (B1.value==null))
{
alert("Enter The Busno");
B1.focus()
return false
}
else
if((T1.value=="") || (T1.value==null))
{
alert("Enter Travels Name");
T1.focus()
return false
}
else
if((F1.value=="") || (F1.value==null))
{
alert("Enter From Place (Source)");
F1.focus()
return false
}
else
if((T11.value=="") || (T11.value==null))
{
alert("Enter To Place (Destination)");
T11.focus()
return false
}
else
if((D1.value=="") || (D1.value==null))
{
alert("Enter The Departure Time");
return false
}
else
if((A1.value=="") || (A1.value==null))
{
alert("Enter The Arrival Time");
A1.focus()
return false
}
Department of Computer Science NCJ
48
else
if((D11.value=="") || (D11.value==null))
{
alert("Enter The Duration Of Journey");
D11.focus()
return false
}
else
if((R1.value=="") || (R1.value==null))
{
alert("Enter The Ratings");
R1.focus()
return false
}
else
if((F11.value=="") || (F11.value==null))
{
alert("Enter Fare Per Seat");
F11.focus()
return false
}
else
if(isNaN(F11.value))
{
alert("Text Not Allowed In Fare Field");
F11.focus();
return false;
}
else
if((S1.value=="") || (S1.value==null))
{
alert("Enter Number Of Seats");
S1.focus()
return false
}
else
if(isNaN(S1.value))
{
alert("Text Not Allowed In Seats Field");
S1.focus();
return false;
}
return true
}
</script>
<title>Insert title here</title>
49
</head>
<body>
<a style=color:blue href="update.jsp">Back</a>
<table bgcolor="white" width="500" height="20" align="left" border="0">
<tr>
<th><img src="D:\bus\images\administrator.jpg" align="left"></th>
</tr>
</table>
<h1>Insert The Information To Be Applied For New Travels</h1>
<form action="new.jsp" name="frm1" onsubmit="return valid()">
<table width="400" height="70" align="center" border="0">
<tr>
<th>Bus no</th><th><input type="text" name="Nbusno"></th>
</tr>
<tr>
<th>Travel(Bus type)</th><th><input type="text" name="Ntravelbustype"></th>
</tr>
<tr>
<th>From</th><th><input type="text" name="Nfrom"></th>
</tr>
<tr>
<th>To</th><th><input type="text" name="Nto"></th>
</tr>
<tr>
<th>Departure</th><th><input type="text" name="Ndept"></th>
</tr>
<tr>
<th>Arrival</th><th><input type="text" name="Narr"></th>
</tr>
<tr>
<th>Duration</th><th><input type="text" name="Ndur"></th>
</tr>
<tr>
<th>Ratings</th><th><input type="text" name="Nrate"></th>
</tr>
<tr>
<th>Fare</th><th><input type="text" name="Nfare"></th>
</tr>
<tr>
<th>Seats Containing</th><th><input type="text" name="Nseats"></th>
</tr>
</table>
<table align="center">
<tr>
<th>
<input type="submit" onfocus="valid()" name="Newupdate" value="Proceed">
50
51
</th>
</tr>
</table>
</form>
<form action="message.jsp" name="frm11">
<table align="center">
<tr>
<th>
<input type="submit" name="confirm" value="confirm">
</th>
</tr>
</table>
<br>
<br><br>
<br><br>
<p align="left" class="copy">2014 © BlueBus.com Designed By Vaibhav</p>
<%
try
{
String NB=request.getParameter("Nbusno");
int NB1=Integer.parseInt(NB);
String NTBT=request.getParameter("Ntravelbustype");
String NF=request.getParameter("Nfrom");
String NT=request.getParameter("Nto");
String ND=request.getParameter("Ndept");
String NA=request.getParameter("Narr");
String NDR=request.getParameter("Ndur");
String NR=request.getParameter("Nrate");
String NFR=request.getParameter("Nfare");
String NS=request.getParameter("Nseats");
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st1=con.createStatement();
int
rs=st1.executeUpdate("insert
into
bus
(busno,travelbustype,from1,to1,departure,arrival,duration,ratings,fare,seats)
values('"+NB1+"','"+NTBT+"','"+NF+"','"+NT+"','"+ND+"','"+NA+"','"+NDR+"','"+NR+"','"+N
FR+"','"+NS+"')");
out.println("Inserted");
}
catch(Exception e)
{
out.println("");
}
52
%>
</body>
</html>
EDIT.JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="javascript">
function validate()
{
var B2=document.frm2.Ebusno
if((B2.value=="") || (B2.value==null))
{
alert("Enter The Busno");
B2.focus()
return false
}
return true
}
</script>
<title>Insert title here</title>
</head>
<body>
<form action="edit.jsp" name="frm2" onsubmit="return validate()">
<a style=color:blue href="update.jsp">Back</a>
<table bgcolor="white" width="500" height="20" align="left" border="0">
<tr>
<th><img src="D:\bus\images\administrator.jpg" align="left"></th>
</tr>
</table>
<h1>Insert The Information To Be Updated For Existing Travels</h1>
<table width="400" height="70" align="center" border="0">
<tr>
<th>Bus no</th><th><input type="text" name="Ebusno"></th>
<th><input
type="Submit"
onfocus="validate()"></th>
</tr>
53
name="Editsearch"
value="search"
align="middle"
</table>
<%ss
String BS=request.getParameter("Ebusno");
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","123456");
Statement st1=con.createStatement();
ResultSet rs=st1.executeQuery("select * from bus where busno='"+BS+"'");
if(rs.next())
{
%>
<table>
<tr>
<th>Bus no</th><th><input type="text" name="Ebusno" value="<%=rs.getString("busno")%>"
readonly="readonly"></th>
</tr>
<tr>
<th>Travel(Bus
type)</th><th><input
type="text"
name="Etravelbustype"
value="<
%=rs.getString("travelbustype")%>"></th>
</tr>
<tr>
<th>From</th><th><input type="text" name="Efrom" value="<%=rs.getString("from1")
%>"></th>
</tr>
<tr>
<th>To</th><th><input type="text" name="Eto" value="<%=rs.getString("to1")%>"></th>
</tr>
<tr>
<th>Departure</th><th><input type="text" name="Edept" value="<%=rs.getString("departure")
%>"></th>
</tr>
<tr>
<th>Arrival</th><th><input type="text" name="Earr" value="<%=rs.getString("arrival")
%>"></th>
</tr>
<tr>
<th>Duration</th><th><input type="text" name="Edur" value="<%=rs.getString("duration")
%>"></th>
</tr>
<tr>
54
55
}
catch(Exception e)
{
out.println(e);
}
%>
</body>
</html>
MESSAGE.jsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE
html
PUBLIC
"-//W3C//DTD
HTML
4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a style=color:blue href="update.jsp">Back</a>
<h1 align="center"><% out.println("Update Has Been Successful"); %></h1>
</body>
</html>
CHECKING.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a style=color:blue href="update.jsp">Back</a>
56
57
SNAPSHOTS
Department of Computer Science NCJ
58
59
60
61
62
63
64
65
66
67
68
69
70
71
TESTING
Unit Testing: Initial every module was tested here to detect coding errors. AlsoEvery module
is authenticated with validation using certain tools. Every
part of each module was tested here.
Integrated Testing : After Unit testing , different modules were combined to form
entire system. This testing was done to check errors that occur while interconnection of
modules. To see if all modules are working and linking properly on generation of events.
72
CONCLUSION
The project has been a rewarding experience in more ways than one. We have
gained a lot of knowledge in HTML, J.S, SQL and J.S.P etc. By developing the
project.
We got a platform to put in our ideas into the project. We also have
experienced that how much creative we are and we have also gained much in
developing forms.
FUTURE ENHANCEMENT
Our future enhancement would be, to develop this project using high-end
softwares so that the customer can the it from anywhere, anytime very
conveniently.
We aim to provide packages for the Customer including Hotel and Taxi services.
The customer would also be able to receive the tickets online if necessary.
We also aim to increase the security of the Customer details by using High security
techniques.
BIBLIOGRAHY
73