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.

JSP standard actions: Querying database

JSP standard actions: Querying database

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

Start my 1-month free trial

JSP standard actions: Querying database

- [Instructor] Now, let us see the demo for JSP standard actions. What we are going to do is, let's say we click on login and enter the credentials. After that, we click on view my profile and this profile information that you see, we are now going to display it with the help of JSP standard actions. So, that's what we are going to work out in the application. The first thing that we have to do is we have to add a method in DAO to get the profile details of the user. So, let's go to Eclipse, that's our application DAO and that's on the third template that's ready with me. This method is going to take a parameter of username. That's going to be passed in from the servlet and I'm going to connect to the database and get the profile details. So, let's get started on that. The first thing is getting a connection to the database. So, on line 102, I'm just going to quickly take the connection object with the help of the DB connection class. Once that's done, let's go ahead and write the…

Contents