up previous next contents
Next: Implicit objects Up: JavaServer Pages Previous: Declarations   Contents

Subsections

Directives

  • Use <%@ ... %> syntax for declarations.
  • Use directives to declare information needed by the JSP engine.
  • Directives include page, include, and taglib.

page directive

  • <%@ page contentType="text/html" %>
  • Lets the developer specify packages to include.
  • Lets the developer specify more advanced page features.

taglib directive

  • <%@ taglib uri="uriToTaglib" prefix="someID" %>
  • Lets the developer include tag libraries.
  • Tag libraries are generally powerful, reusable components for web developers.
  • Tag libraries can be created by local developers, are available open source, or can be purchased.

include directive

  • <%@ include file="filename.jsp" %>
  • Lets one JSP include another JSP or HTML document.
  • The JSP container reads the included file, and creates on servlet.
  • Includes occur at translation time.
  • If you change the included file ...
  • Works differently than <% jsp:include page="filename.jsp" />


up previous next contents
Next: Implicit objects Up: JavaServer Pages Previous: Declarations   Contents