Cinema Ticketing System using REST Web Services (JAX-RS)
Technologies used in this project JSP, HTML, JS, CSS, Bootstrap, JAVA 8, MySQL
What will you find in this project:
Working ticketing system with email receipt and admin dashboard to add or edit the theater schedule, movies and rooms
Asynchronous chat between administrators and users
Registration, Login, Contact us forms
Dynamic pages for movie description
Service Oriented Architecture (SOA) was used in this system. The reason SOA was used is that it is given to us the ability to split the individual components of the system into different services, each of which performs a separate function.
For all web services of the system we use REST architecture. Therefore all services are accessible via URI. Calling a Web Service using the HTTP protocol and GET / PUT / POST / DELETE methods make it possible to manipulate system resources.
The API used to develop all Web Services is JAXRS.
Specifically, Jersey *, the open-source framework for development of RESTful web services in Java.
* Jersey 1.x has the JEE6 version of the JAX-RS
At a glance the web-services and pages that appear to the end user:
- my.db
- MySQL.java | 1 private method, 2 public methods
- my.objects
- User.java | 14 public methods (get + set)
- my.restful.web.services = 31 WEB SERVICES
- Admin.java | 15 Web-Services
- Chat.java | 6 Web-Services, 1 private method
- Contact.java | 1 Web-Service
- Login.java | 1 Web-Service, 1 private method
- Profile.java | 4 Web-Services
- Register.java | 1 Web-Services
- Ticket.java | 3 Web-Services, 1 private method
- my.third.party
- RandomPas.java| 1 Web-Service
- SendEmail.java | 1 public method
In MySQL has created database “cinethisio” which is the only one that interacts with it system. Subsequently a brief description will be printed for each table that have been created for the implementation of system endpoints.
DESC users; All system users are stored here
uid = unique user ID
password = MD5 (pass)
sysadmin = booleanDESC logs; Logs are stored here after each successful login.
DESC chatrooms; This is where the asynchronous messages by user and administrator are stored.
chatID = the chat we want to we open every time and were to place messages
type = symbolizes who sent it (message U = user, A = admin)
user = username simple user
sysadmin = username admin
msg = the message sent
date = date msg sendDESC theater;This table represents the available rooms that the cinema has
DESC movie; This table represents the available movies that are displayed in the respective rooms
DESC schedule; In this table we save the movie program for a day.
sID = unique program id
theterID = projection room
movieID = the movie being played
dateOfAir = the date displayed
availableSpots = the available places
totalSpots = the total seats (of the room)
movieUP = Boolean control variable eg when the administrator wants to hide this program
(movie coming soon, or movie that the movie stops showing)DESC booking; In this table we have the tickets that the users have booked.
bID = booking number
uID = User ID
sID = program ID (schedule)
spots = number of reserved seats
Download and install MySQL. When installing use root / root as username and password for the administration credentials. Otherwise they will need to be changed in MySQL.java
Create a database named "cinethisio" and then import the sql file with the following command:
mysql -u root -p cinethisio < PATH/cinethisio.sql
Install JDK 8 and 2018-09 JAVA EE version of Eclipse.
Install Apache Tomcat v9 in Eclipse and at the installation folder of tomcat coppy the file my_jar\external\mysqlconnector-java-5.1.49 at lib folder.
Coppy the project at Eclipse Worckspace. The projecct is at my_files\CINEThisio.
Check build path of project. The following jar should be in build path:
javax.mail , jersey-bundle-1.19.4, jsr311-api-1.1.1, mysql-connector-java-5.1.49
Note that all externals jars can be found at my_jar\external\ but also at WebContent\WEB-INF\lib of project! In case you get an error, delete everything from the build path and add them again.Run Project from Eclipse at Apache server and then visit http://localhost:8080/CINEThisio
Login credentials
Admin
username: alex@gmail.com
password: 1234User
username: john@gmail.com
password: 1234
Signup form
Login form
Admin Dashboard
User menu
User login logs and account info change
Contact usform
Chat with administrators
When a user sends messages to an administrator, the admin can reply from his dashboard
Final chat from admin and user side
The chat at db
Ticketing system
Dynamic page for the selected movie
Book a ticket
Email receipt
Admin dashboard to edit or add movies,theaters, schedules