URL Shortener with Java and Jakarta EE
URL Shortener is a web application that allows you to shorten URLs with a custom alias. To do this, it uses MySQL to store the URLs and the aliases. Implements a AUTH_CODE to protect the creation of new URLs. The application is developed with Java and Jakarta EE. Implements JDBC and JPA to interact with the database. The application is deployed on a VPS using Docker.
demo.mp4
- Java SE
- Jakarta EE
- JPA - Hibernate
- JDBC
- JSP
- JSTL
- CDI
- Tomcat
- MySQL
- CSS
- Water.css
You can run the application in a Docker container or in your local environment.
If you don't want to build the application, you can download the Docker image from the Packages section
-
Build the Docker image
docker build -t todo-app . -
Run the Docker container
docker container run -p 8080:8080 todo-app
-
Use
docker-composeto run the application with MySQL and PhpMyAdmindocker compose up -d
Make sure to create the database with the script in
src/main/resources/db/db.sqlbefore running the application.
-
Clone the repository
git@github.com:ASJordi/url-shortener-java.git
-
Create a MySQL database with the script in
src/main/resources/db/db.sql -
Configure the database connection in
src/main/webapp/META-INF/context.xml -
Install dependencies with Maven
-
Configure tomcat to use the MySQL connector
-
Run the application with:
mvn tomcat7:redeploy
Distributed under the MIT License. See LICENSE for more information.
Jordi Ayala - @ASJordi
Project Link: https://github.com/ASJordi/url-shortener-java

