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
From the course: Java EE: Servlets and JavaServer Pages (JSP)
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Understanding the advent of standard actions6m 16s
-
(Locked)
JSP standard actions: Querying database6m 23s
-
(Locked)
JSP standard actions: Displaying data7m 2s
-
(Locked)
Expression language7m 20s
-
(Locked)
Using expression language in JSP9m 52s
-
(Locked)
Using implicit objects of expression language7m 53s
-
(Locked)
-
-