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

Unlock the full course today

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

JSP standard actions: Displaying data

JSP standard actions: Displaying data

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

Start my 1-month free trial

JSP standard actions: Displaying data

- [Instructor] So, this is a profile JSP. Now, on line number 36, the first thing that we are going to do is, we are going to fetch that user object that we set in the request code. So, that is object as available on the JSP and then, we can start displaying the data out of it. So, for that, the first standard action that I'm going to use is JSP colon use bean. It comes in with an ID attribute and this ID, I'm going to fill in as user. Why? Let's go back to the ViewProfile servlet and check the key that you have mentioned for the user object. That's the one. So, this key is basically going to sit in the ID attribute. More over, we also have to specify the scope it came from. So, I'm going to say scope and it is going to set to request. Another thing that we also have to mention is the type. Type is the fully qualified class name of the user bean. So, this object is of the user type. So, we just need to go to the user bean, take that package name, come right here on line number 36…

Contents