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

JSP elements: Scriptlet and expression

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

Start my 1-month free trial

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…

Contents