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.

Understanding JSP and its features

Understanding JSP and its features

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

Start my 1-month free trial

Understanding JSP and its features

- Now let us introduce ourselves to JavaServer Pages, which is the JSP, which is of course the second bit of our course. But the first thing to understand is why do you need a JSP when you already have an HTML? So let's understand the problems that we have with HTML pages. The first of the things is it allows you to render static data alone. There is no option to write out any kind of dynamic data on an HTML page. If you remember in our search use case of our application, in order to resolve this issue, we had proposed a workaround solution where we read an entire HTML template as a string, manipulated that string to replace certain portions, and then wrote that entire string back to the client. Nobody will do this in the industry projects today. Everybody uses a JSP. That was just a workaround in order to solve that problem at that point in time. That's because if you start doing an I/O operation to read and write HTML templates back and forth, it's going to be a time-consuming…

Contents