ChristosHadjichristofi / Databases-Java-Demo

[ECE NTUA] Databases project demo using Java and MySQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Databases-Java-Demo

Demo created with other Languages and Technologies

  1. NodeJS
  2. Python
  3. PHP

Dependencies

  1. NodeJS
  2. MySQL for Windows

Useful Tools

  1. Database Administration Tools like Dbeaver, Navicat, MySQL Workbench
  2. IntelliJ

Initialize Project in IntelliJ

  1. File > New > Project > Java Enterprise
  2. Select Application Server the latest Tomcat Server from the dropdown menu
  3. Build Tool - Maven, Test runner - JUnit, Languages Java. Press Next
  4. Choose Web Profile. Press Next
  5. Name the project, Name the Group (package)

Project Structure

  1. src/main/java/<package-name>/ - contains the Java Classes (Controllers - Logic of the WebApp)
  2. src/main/java/webapp - contains the assets (css, images), WEB-INF folder, JSP pages
  3. src/main/java/webapp/WEB-INF - must add lib folder and inside the MySQL connector jar file

Tips

  1. JSP pages - is a Java standard technology that enables you to write dynamic, data-driven pages for your Java web applications, basically HTML with code snippets (can contain variables, for loops, etc)
  2. To add the MySQL connector jar file:
    1. Create a new directory under WEB-INF named lib
    2. Unzip the file that you've downloaded
    3. Insert the .jar file inside lib folder
  3. When you start the project you will notice that the url is localhost:8080/<project_name>_war_exploded, to remove <project_name>_war_exploded:
    1. Stop the Server if it is Running;
    2. In the Menu Bar Above Press -> Run
    3. Debug
    4. Edit Configurations
    5. Select your server (Tomcat or etc.)
    6. Deployment
    7. In the Application Context Bar: delete (packageName)_war_exploded/
    8. Press Apply and Debug

landing

add-student

students

grades

About

[ECE NTUA] Databases project demo using Java and MySQL

License:MIT License


Languages

Language:Java 95.4%Language:CSS 4.6%