Read this post from start

Creating a database driven application

Let’s create a complete CRUD (create, read, update, delete) sample project with Eclipse + Tomcat + Maven

1.  Create a new maven web project as discussed in part 1
Group Id    :    com.ap
Artifact Id  :    com.ap.crud

2.  Add following dependencies in pom.xml

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.36</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

3.  If you don’t see the src/main/java folder in the project, right click on src/main folder and create a new folder with name java

4.  Now right click on src/main/java folder, create new package named com.ap.crud.servlets
Similary create following packages:
com.ap.crud.entity              ( for classes corresponding to tables )
com.ap.crud.dao                ( for database operations )
com.ap.crud.data                ( for project data )

You can download the whole project from the link below
Download Complete Project