Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
shashirajraja committed Apr 2, 2023
1 parent ac82b97 commit cb2f1d8
Show file tree
Hide file tree
Showing 78 changed files with 1,870 additions and 1,229 deletions.
23 changes: 13 additions & 10 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="C:/Tomcat 9.0/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="E:/Eclipse/apache-tomcat-8.0.22-windows-x64/apache-tomcat-8.0.22/lib/servlet-api.jar"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0">
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_25">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="build/classes"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build/
/target/
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
Expand Down
4 changes: 4 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
26 changes: 25 additions & 1 deletion .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="TrainBook">



<wb-module deploy-name="TrainBook-0.0.1-SNAPSHOT">


<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>



<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>



<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>



<property name="context-root" value="TrainBook"/>



<property name="java-output-path" value="/TrainBook/build/classes"/>



</wb-module>



</project-modules>
3 changes: 1 addition & 2 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v9.0"/>
<fixed facet="java"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="3.1"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="3.1"/>
</faceted-project>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.wst.validation.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1
81 changes: 63 additions & 18 deletions Dummy-Database.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,74 @@
### Just open the Oracle sql command prompt and login to administrator user and copy paste the following codes for creating dummy database:

```SQL
create user reservation identified by manager;
ALTER SESSION SET "_ORACLE_SCRIPT"=TRUE;

grant dba to reservation;
CREATE USER RESERVATION IDENTIFIED BY MANAGER;

commit;
GRANT DBA TO RESERVATION;

connect reservation/manager;
COMMIT;

create table admin6(uname varchar2(40) primary key,name varchar2(40),
pword varchar2(50),mail_id varchar2(60),phone_no varchar2(12));

create table train6(tr_no number(10) primary key,tr_name varchar2(70),
from_stn varchar2(20),to_stn varchar2(20),available number(5),fare number(5));
CONNECT RESERVATION/MANAGER;

create table register(uname varchar2(40) primary key,pword varchar2(50),
fname varchar2(40),lname varchar2(40),
addr varchar2(100), phno varchar2(12), mailid varchar2(60));
CREATE TABLE "RESERVATION"."CUSTOMER"
(
"MAILID" VARCHAR2(40) PRIMARY KEY,
"PWORD" VARCHAR2(20) NOT NULL,
"FNAME" VARCHAR2(20) NOT NULL,
"LNAME" VARCHAR2(20),
"ADDR" VARCHAR2(100),
"PHNO" NUMBER(12) NOT NULL
);

insert into admin6 values('admin','admin','admin','[email protected]','9874561230');
insert into admin6 values('shashi','shashi','admin','[email protected]','98323561230');
insert into train6 values(10101,'Jodhpur Exp','Howrah','Jodhpur',152,450);
insert into train6 values(10102,'Mumbai Mail','Gaya','Mumbai',182,650);
insert into register values('shashi','shashi','Shashi','Raj','Tekari, Gaya, Bihar',954745222,'[email protected]');
CREATE TABLE "RESERVATION"."ADMIN"
(
"MAILID" VARCHAR2(40) PRIMARY KEY,
"PWORD" VARCHAR2(20) NOT NULL,
"FNAME" VARCHAR2(20) NOT NULL,
"LNAME" VARCHAR2(20),
"ADDR" VARCHAR2(100),
"PHNO" NUMBER(12) NOT NULL
);

commit;

CREATE TABLE "RESERVATION"."TRAIN"
(
"TR_NO" NUMBER(10) PRIMARY KEY,
"TR_NAME" VARCHAR2(70) NOT NULL,
"FROM_STN" VARCHAR2(20) NOT NULL,
"TO_STN" VARCHAR2(20) NOT NULL,
"SEATS" NUMBER(4) NOT NULL,
"FARE" NUMBER(6,2) NOT NULL
);

CREATE TABLE "RESERVATION"."HISTORY"
(
"TRANSID" VARCHAR2(30) PRIMARY KEY,
"MAILID" VARCHAR2(40) REFERENCES "RESERVATION"."CUSTOMER"(MAILID),
"TR_NO" NUMBER(10),
"DATE" DATE,
"FROM_STN" VARCHAR2(20) NOT NULL,
"TO_STN" VARCHAR2(20) NOT NULL,
"SEATS" NUMBER(3) NOT NULL,
"AMOUNT" NUMBER(8,2) NOT NULL
);

COMMIT;

INSERT INTO RESERVATION.ADMIN VALUES('[email protected]','admin','System','Admin','Demo Address 123 colony','9874561230');
INSERT INTO RESERVATION.CUSTOMER VALUES('[email protected]','shashi','Shashi','Raj','Kolkata, West Bengal',954745222);

INSERT INTO RESERVATION.TRAIN VALUES(10001,'JODHPUR EXP','HOWRAH','JODHPUR', 152, 490.50);
INSERT INTO RESERVATION.TRAIN VALUES(10002,'YAMUNA EXP','GAYA','DELHI', 52, 550.50);
INSERT INTO RESERVATION.TRAIN VALUES(10003,'NILANCHAL EXP','GAYA','HOWRAH', 92, 451);
INSERT INTO RESERVATION.TRAIN VALUES(10004,'JAN SATABDI EXP','RANCHI','PATNA', 182, 550);
INSERT INTO RESERVATION.TRAIN VALUES(10005,'GANGE EXP','MUMBAI','KERALA', 12, 945);
INSERT INTO RESERVATION.TRAIN VALUES(10006,'GARIB RATH EXP','PATNA','DELHI', 1, 1450.75);

INSERT INTO RESERVATION.HISTORY VALUES('BBC374-NSDF-4673','[email protected]',10001,TO_DATE('02-FEB-2024'), 'HOWRAH', 'JODHPUR', 2, 981);
INSERT INTO RESERVATION.HISTORY VALUES('BBC375-NSDF-4675','[email protected]',10004,TO_DATE('12-JAN-2024'), 'RANCHI', 'PATNA', 1, 550);
INSERT INTO RESERVATION.HISTORY VALUES('BBC373-NSDF-4674','[email protected]',10006,TO_DATE('22-JULY-2024'), 'PATNA', 'DELHI', 3, 4352.25);

COMMIT;
```
99 changes: 72 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,76 @@ STEP 2: Login to administrator User as: ```connect <username>/<password>```
STEP 3 :Copy paste the following SQL Query:

```SQL
create user reservation identified by manager;

grant dba to reservation;

commit;

connect reservation/manager;

create table admin6(uname varchar2(40) primary key,name varchar2(40),
pword varchar2(50),mail_id varchar2(60),phone_no varchar2(12));

create table train6(tr_no number(10) primary key,tr_name varchar2(70),
from_stn varchar2(20),to_stn varchar2(20),available number(5),fare number(5));

create table register(uname varchar2(40) primary key,pword varchar2(50),
fname varchar2(40),lname varchar2(40),
addr varchar2(100), phno varchar2(12), mailid varchar2(60));

insert into admin6 values('admin','admin','admin','[email protected]','9874561230');
insert into admin6 values('shashi','shashi','admin','[email protected]','98323561230');
insert into train6 values(10101,'Jodhpur Exp','Howrah','Jodhpur',152,450);
insert into train6 values(10102,'Mumbai Mail','Gaya','Mumbai',182,650);
insert into register values('shashi','shashi','Shashi','Raj','Tekari, Gaya, Bihar',954745222,'[email protected]');

commit;
ALTER SESSION SET "_ORACLE_SCRIPT"=TRUE;

CREATE USER RESERVATION IDENTIFIED BY MANAGER;

GRANT DBA TO RESERVATION;

COMMIT;

CONNECT RESERVATION/MANAGER;

CREATE TABLE "RESERVATION"."CUSTOMER"
(
"MAILID" VARCHAR2(40) PRIMARY KEY,
"PWORD" VARCHAR2(20) NOT NULL,
"FNAME" VARCHAR2(20) NOT NULL,
"LNAME" VARCHAR2(20),
"ADDR" VARCHAR2(100),
"PHNO" NUMBER(12) NOT NULL
);

CREATE TABLE "RESERVATION"."ADMIN"
(
"MAILID" VARCHAR2(40) PRIMARY KEY,
"PWORD" VARCHAR2(20) NOT NULL,
"FNAME" VARCHAR2(20) NOT NULL,
"LNAME" VARCHAR2(20),
"ADDR" VARCHAR2(100),
"PHNO" NUMBER(12) NOT NULL
);


CREATE TABLE "RESERVATION"."TRAIN"
(
"TR_NO" NUMBER(10) PRIMARY KEY,
"TR_NAME" VARCHAR2(70) NOT NULL,
"FROM_STN" VARCHAR2(20) NOT NULL,
"TO_STN" VARCHAR2(20) NOT NULL,
"SEATS" NUMBER(4) NOT NULL,
"FARE" NUMBER(6,2) NOT NULL
);

CREATE TABLE "RESERVATION"."HISTORY"
(
"TRANSID" VARCHAR2(30) PRIMARY KEY,
"MAILID" VARCHAR2(40) REFERENCES "RESERVATION"."CUSTOMER"(MAILID),
"TR_NO" NUMBER(10),
"DATE" DATE,
"FROM_STN" VARCHAR2(20) NOT NULL,
"TO_STN" VARCHAR2(20) NOT NULL,
"SEATS" NUMBER(3) NOT NULL,
"AMOUNT" NUMBER(8,2) NOT NULL
);

COMMIT;

INSERT INTO RESERVATION.ADMIN VALUES('[email protected]','admin','System','Admin','Demo Address 123 colony','9874561230');
INSERT INTO RESERVATION.CUSTOMER VALUES('[email protected]','shashi','Shashi','Raj','Kolkata, West Bengal',954745222);

INSERT INTO RESERVATION.TRAIN VALUES(10001,'JODHPUR EXP','HOWRAH','JODHPUR', 152, 490.50);
INSERT INTO RESERVATION.TRAIN VALUES(10002,'YAMUNA EXP','GAYA','DELHI', 52, 550.50);
INSERT INTO RESERVATION.TRAIN VALUES(10003,'NILANCHAL EXP','GAYA','HOWRAH', 92, 451);
INSERT INTO RESERVATION.TRAIN VALUES(10004,'JAN SATABDI EXP','RANCHI','PATNA', 182, 550);
INSERT INTO RESERVATION.TRAIN VALUES(10005,'GANGE EXP','MUMBAI','KERALA', 12, 945);
INSERT INTO RESERVATION.TRAIN VALUES(10006,'GARIB RATH EXP','PATNA','DELHI', 1, 1450.75);

INSERT INTO RESERVATION.HISTORY VALUES('BBC374-NSDF-4673','[email protected]',10001,TO_DATE('02-FEB-2024'), 'HOWRAH', 'JODHPUR', 2, 981);
INSERT INTO RESERVATION.HISTORY VALUES('BBC375-NSDF-4675','[email protected]',10004,TO_DATE('12-JAN-2024'), 'RANCHI', 'PATNA', 1, 550);
INSERT INTO RESERVATION.HISTORY VALUES('BBC373-NSDF-4674','[email protected]',10006,TO_DATE('22-JULY-2024'), 'PATNA', 'DELHI', 3, 4352.25);

COMMIT;
```

### ====== Importing and Running the Project Through Eclipse EE ===========
Expand All @@ -107,9 +152,9 @@ Step 5: Right Click On Project > Run As > Run On Server > Select Tomcat V8.0 > N

Step 6: Check Running The Site At <a Href="Http://localhost:8083/trainbook/">http://localhost:8083/trainbook/</a>

Step 7: Default Username And Password For Admin Is "admin" And "admin"
Step 7: Default Username And Password For Admin Is "admin@demo.com" And "admin"

Step 8: Default Username And Password For User Is "shashi" And "shashi"
Step 8: Default Username And Password For User Is "shashi@demo.com" And "shashi"



Expand Down
2 changes: 1 addition & 1 deletion WebContent/AddTrains.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="home">
<p1 class="menu"><a href="AdminHome.html">Home</a></p1>
</div>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/AdminHome.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="home">
<p1 class="menu"><a href="AdminHome.html">Home</a></p1>
</div>
Expand Down
4 changes: 2 additions & 2 deletions WebContent/AdminLogin.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="main">
<p1 class="menu"><a href="UserLogin.html">Login as User</a></p1>
<p1 class="menu"><a href="UserRegister.html">New User</a></p1>
Expand All @@ -97,7 +97,7 @@ <h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NIT
</header>
<div class="tab green">Admin Login</div>
<form action="adminlogin" class="tab brown" method="post">
<br/>UserName: <input type="text" name="uname"><br/><br/>
<br/>UserName: <input type="text" name="uname" placeholder="Enter Your EmailId"><br/><br/>
Password: <input type="password" name="pword"><br/><br/>
<input type="submit" value=" LOGIN "><br/>

Expand Down
2 changes: 1 addition & 1 deletion WebContent/AdminSearchTrain.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="home">
<p1 class="menu"><a href="AdminHome.html">Home</a></p1>
</div>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/AdminUpdateTrain.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="home">
<p1 class="menu"><a href="AdminHome.html">Home</a></p1>
</div>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/Availability.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="home">
<p1 class="menu"><a href="userhome">Home</a></p1>
</div>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/BookTrains.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<header>
<h1 class="hd">National InformaTion Railway Tourism Control Hyderabad <br/>[ NITRTC ]</h1>
<h1 class="hd">National Ticket Booking Spot</h1>
<div class="home">
<p1 class="menu"><a href="userhome">Home</a></p1>
</div>
Expand Down
Loading

0 comments on commit cb2f1d8

Please sign in to comment.