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 directives: Page

JSP directives: Page

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

Start my 1-month free trial

JSP directives: Page

- [Instructor] Now let's take a look at the JSP Directives. JSP Directives are special instructions that are provided to the container software for the translation process. We know by now that the container is responsible for converting that JSP into a servlet file, and whilst this conversion takes place, directives are those components inside your JSP page which will relay those instructions to the container for the translation process and definitely it is going to change how the compilation process also happens. Directives themselves will never appear as a part of the output. They do not produce any output. They're just supposed to be relaying messages to the container. So what are the kinds of jobs that JSP Directives can do for us? It could import classes for the code that you're writing on the JSP. So let's say you're using a lot of classes on the JSP code. In Java the rule is that if you're using a class you need to import it. So that's what the directive does for us. If you are…

Contents