From the course: Java EE: Servlets and JavaServer Pages (JSP)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Register user: Collecting form data and calling DAO

Register user: Collecting form data and calling DAO

From the course: Java EE: Servlets and JavaServer Pages (JSP)

Start my 1-month free trial

Register user: Collecting form data and calling DAO

- [Woman] Now let us take a look at the use case that we are going to implement as part of the post request. This is my application when I click on the new user hyperlink. There's a registry user form that opens up. So the user could fill out the fields of username, password, first name, last name, age and an activity. And then when the user submits this form, they going to submit it using the POST request. Once the request is submitted, we are just going to save this entire record to the database Right, so let's get started with this. The steps will be, we will stick with the approach. We use the action on the jsp html, from there we go to a servlet, from the servlet we call the dao, and the dao is going to talk to the database. So the dao is going to help us insert that record into one of the tables of our schemer. Let's take a look at our application. This is that registered html page, and all the fields that you saw as a part of the form are in compassion to this form element. So…

Contents