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 elements: Scriptlet and expression
From the course: Java EE: Servlets and JavaServer Pages (JSP)
JSP elements: Scriptlet and expression
- [Instructor] Let us now take a look at how are we going to use scriptlet and expression element on a JSP. If you remember our search use case, this was the search results page which was trying to display all the products in a static fashion. Every division element represented on product and we had the SRC attribute and the name attribute of the image as placeholders which we were trying to replace with the data in the servlet code. So, basically, we were trying to deal very hard with this HTML file. What we are going to do now is we will transform this HTML into a JSP and make sure that the product data that you want to display on the page gets generated dynamically through the scriptlet and expression elements. So, let's get started on it. The first thing that we have to do is we have to convert this HTML file into a JSP. It's going to be as simple as renaming it and changing this extension to .jsp. Right. Now, there's another thing that we need to do. Let's go to the…
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 JSP and its features4m 57s
-
(Locked)
JSP elements: Scriptlet, declaration, and expression4m 34s
-
(Locked)
JSP elements: Scriptlet and expression9m 26s
-
(Locked)
JSP elements: Declaration4m 3s
-
(Locked)
Understanding the JSP life cycle5m 54s
-
(Locked)
JSP directives: Page8m 52s
-
(Locked)
JSP directives: Include and taglib5m 23s
-
(Locked)
Understanding implicit objects in JSP5m 12s
-
(Locked)
-
-
-
-
-