This project, Train-Ticket-Enquiry-System, is designed using the MVC (Model-View-Controller) architecture. It simulates a real-world train booking application, utilizing Hibernate ORM for database management, Servlets and JSP for request handling, and various other technologies for a seamless user experience.
Login Page | Add Train Page | Fare Enquiry Page |
---|---|---|
- MVC Architecture: Clear separation between Model, View, and Controller layers.
- JSP & Servlet Integration: JSP for the UI, with servlets managing back-end logic.
- Hibernate ORM: Maps Java objects to database tables, facilitating database interactions.
- MySQL Database: Stores train schedules, booking data, and user info.
- HTML & CSS: Modern, responsive interface design.
- Session Management: User login sessions are managed securely.
- Maven: Manages project dependencies and builds.
- Tomcat Server: Deployed on Apache Tomcat for local development and testing.
- Java Development Kit (JDK) 8 or above
- Apache Tomcat Server
- MySQL Database
- Maven
-
Clone the Repository:
git clone https://github.com/Venumadhavmule/Train-Ticket-Enquiry-System.git
-
Import the Project:
- Open Eclipse IDE and import the cloned project as a Maven project.
-
Database Setup:
-
Set up a MySQL database.
-
Update the database configuration in the
hibernate.cfg.xml
file. Replaceyour_database_name
andyour_password
as needed:<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/your_database_name</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">your_password</property>
-
-
Configure Tomcat in Eclipse:
- Go to Servers in Eclipse, add a new Apache Tomcat server, and link your project to it.
-
Build the Project:
- Right-click on the project, select Run As > Maven Install.
-
Run the Application:
- Start the Tomcat server in Eclipse.
- Access the application at
http://localhost:8080/Train-Ticket-Enquiry-System
.
After setting up, open the application in your browser. You can log in to start booking train tickets and exploring schedules.