1000 Projects

airline reservation system project in html

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

The following code added in java and the front end coded with HTML & JSP. Here you can download the total project and execute it with out any errors.

Code for the Login Action in Airline System.


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 LoginAction extends org.apache.struts.action.Action
{

private final static String SUCCESS = "success";
private final static String FAILURE = "failure";
public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception
{
ActionForward nextpage=null;
LoginForm lgForm = (LoginForm) form;
String uname = lgForm.getUsername();
String passwd = lgForm.getPassword();
String unam=null;
String password=null;

try {

Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XE","system","tiger");
System.out.println("connected");
System.out.println("lgForm.getUsername()->"+lgForm.getUsername());
System.out.println("lgForm.getpassword()->"+lgForm.getPassword());
Statement st=con.createStatement();

ResultSet rs= st.executeQuery("select username ,password from register where username ='"+uname+"'and password='"+passwd+"'");
while (rs.next()){
unam=rs.getString(1);
password =rs.getString(2);
}
}catch(Exception s)
{
System.out.println(s);
}
if(uname.equals(unam)&& passwd.equals(password)) {
nextpage= mapping.findForward(SUCCESS);

}

else{
nextpage= mapping.findForward(FAILURE);
}

return nextpage;
}

}

Download airline reservation system jsp and Java project in HTML.


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

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



‹‹‹ Airline Reservation System Project Report SRS

Airline Reservation System Project In VB ›››

Custom Search

2 Comments to "airline reservation system project in html"

  1. mahesh wrote:

    need company web page design

  2. sujatha wrote:

    its useful to us.thank u

Leave Your Comment

 
Powered by 1000Projects.org , All rights Reserved, Copyright Policy