About The Project
SignIn page
SignUp page
Profile page
The goal of the project is to create a web application using Java EE and database (PostgreSQL) without connecting a modern technology stack like spring boot and hibernate.
In the application, you can create an account and upload images to the server. For each user is given a total of 10 MB of memory.
Built With
- Java 11
- Java EE (Servlets, JSP)
- JDBC (PostgreSQL)
- Apache Maven
- Apache Tomcat 8
Getting Started
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Prerequisites
Install what you don't have.
- Java 8 JDK
- Install java 8 suitable for your OS using this link. Here is an example for linux.
wget "https://github.com/frekele/oracle-java/releases/download/8u92-b14/jdk-8u92-linux-x64.tar.gz"
sudo mkdir /opt/jdk
sudo tar xf jdk-8u92-linux-x64.tar.gz -C /opt/jdk
sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_92/bin/java 100
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_92/bin/javac 100
java -version # check your installation
- Apache Maven
sudo apt install maven
mvn -version # check your installation
- PostgreSQL
sudo apt -y install postgresql
psql --version # check your installation
- Apache Tomcat 8
sudo mkdir /opt/tomcat
wget "https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.73/bin/apache-tomcat-8.5.73.tar.gz"
sudo tar xf apache-tomcat-8.5.73.tar.gz -C /opt/tomcat/
Installation
- Clone the repo
git clone https://github.com/MeowthPerry/javaee_app.git
- Change password for DB user and create tables
sudo -i -u postgres # change user
psql
ALTER USER postgres WITH PASSWORD 'new_password';
\i {PATH_TO_REPOSITORY}/javaee_app/src/main/resources/sql/schema.sql;
\i {PATH_TO_REPOSITORY}/javaee_app/src/main/resources/sql/data.sql;
\q # to quit psql
- Change project's properties file
nano javaee_app/src/main/resources/application.properties
- Build project using Maven
mvn -f {PATH_TO_REPOSITORY}/javaee_app/pom.xml clean install
- Copy compiled files to Tomcat
sudo cp -r {PATH_TO_REPOSITORY}/javaee_app/target/ProfileApp /opt/tomcat/apache-tomcat-8.5.73/webapps/
Usage
- Start Tomcat
sudo bash /opt/tomcat/apache-tomcat-8.5.73/bin/startup.sh
- Three pages are available to you.
- http://localhost:8080/ProfileApp/signIn
- http://localhost:8080/ProfileApp/signUp
- http://localhost:8080/ProfileApp/profile
- If you use VirtualBox you have to crate new port forwarding rule.
- To turn off Tomcat
sudo bash /opt/tomcat/apache-tomcat-8.5.73/bin/shutdown.sh
To contact me
- Email: [email protected]
- Telegram: @ahahahahahahahahahahahabibullin