From the course: Java EE 8 Essential Training

Unlock the full course today

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

JSP basics

JSP basics - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

JSP basics

- [Instructor] Let's take a look at how Java server pages make it easier to render content from a Jave EE application. To start out, we'll begin where we left off in our lest servlet lesson. However instead of rendering the view from hard-coded markup in the servlet, we're going to use JSPs because they're more flexible and you'll see it's a lot easier. So to start out, we need to create a JSP. To do that, we place the JSP within our web content folder source main web app. So just right-click on that folder, go to new, and then select other, and then type JSP, and you'll see we have the option to select a JSP file. Now the next thing we need to do is provide a name for that JSP. We're going to call it list dot JSP, and then we'll hit next and you'll see we're given the option to pick a JSP template. And these are basically just using different HTML doc types. It's fine for us to use HTML5, so just leave the default…

Contents