- Database Administration Tools like Dbeaver, Navicat, MySQL Workbench
- IntelliJ
- File > New > Project > Java Enterprise
- Select Application Server the latest Tomcat Server from the dropdown menu
- Build Tool - Maven, Test runner - JUnit, Languages Java. Press Next
- Choose Web Profile. Press Next
- Name the project, Name the Group (package)
src/main/java/<package-name>/
- contains the Java Classes (Controllers - Logic of the WebApp)src/main/java/webapp
- contains the assets (css, images), WEB-INF folder, JSP pagessrc/main/java/webapp/WEB-INF
- must add lib folder and inside the MySQL connector jar file
- 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)
- To add the MySQL connector jar file:
- Create a new directory under
WEB-INF
namedlib
- Unzip the file that you've downloaded
- Insert the
.jar
file insidelib
folder
- Create a new directory under
- When you start the project you will notice that the url is
localhost:8080/<project_name>_war_exploded
, to remove<project_name>_war_exploded
:- Stop the Server if it is Running;
- In the Menu Bar Above Press -> Run
- Debug
- Edit Configurations
- Select your server (Tomcat or etc.)
- Deployment
- In the Application Context Bar: delete
(packageName)_war_exploded/
- Press Apply and Debug