Chapter 13. Including Files and Applets in JSP Pages

Topics in This Chapter

  • Using jsp:include to include pages at request time

  • Using <%@ include ... %> (the include directive) to include files at page translation time

  • Understanding why jsp:include is usually better than the include directive

  • Using jsp:plugin to include applets for the Java Plug-in

JSP has three main capabilities for including external pieces into a JSP document:

  • The jsp:include action. The jsp:include action lets you include the output of a page at request time. Its main advantage is that it saves you from changing the main page when the included pages change. Its main disadvantage is that since it includes the output of the secondary page, not the secondary page's actual code as with ...

Get Core Servlets and JavaServer Pages™: Volume 1: Core Technologies, 2nd Edition 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.