JSP Page Elements

This section discusses how to use each of the three different JSP page element types:

  • Directives

  • Scripting elements and implicit objects

  • Expressions

JSP Directives

When you construct JSP pages, you can specify certain directives to the JSP container. For example, you can specify an error page that is called if there are problems with your JSP page. Or, you can specify what Java classes you want to include during execution. The way to do this is through a JSP directive.

Directives are specified by tags that use the <%@ and %> characters. An example of a page directive that tells the JSP container to import all the classes in the java.util package is:

<%@ page import= "java.util.*" %>

There are several types of directives for ...

Get J2EE™ Applications and BEA™ WebLogic Server™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.