I am using intellij.
The way I am creating project is "File -> New -> Project -> JavaEnterprise -> Web Application (Select Server)"
I want to know how to set it up with Maven.
I need JSP, Servlet, TOMCA, MySQL
I am using intellij.
The way I am creating project is "File -> New -> Project -> JavaEnterprise -> Web Application (Select Server)"
I want to know how to set it up with Maven.
I need JSP, Servlet, TOMCA, MySQL
In intelliJ, select maven from new project. Then check, "create from archetype". Select "archetype-maven-webapp"
After the project is created, add
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
in the pom file. Wait till it loads. Hope this helps.
You should learn about maven archetypes.
Maven has concept of archetypes.
From the list of available archetypes you could potentially use spring-boot-sample-web-jsp-archetype
. It will create Spring Boot application (by default based on Tomcat). It should also suit for development of servlets.
Unfortunately concerning MySQL dependency you need to provide it manually or check what is generated by other archetypes.