A P P E N D I X
Packaging JSP Pages
This appendix shows two simple examples of packaging a JSP page into a WAR for delivery
into a Web container. In the first example, the JSP page is delivered in source form. This is
likely to be the most common example. In the second example the JSP page is compiled into
a Servlet that uses only Servlet 2.2 and JSP 1.1 API calls; the Servlet is then packaged into a
WAR with a deployment descriptor such that it looks as the original JSP page to any client.
This appendix is non normative. Actually, strictly speaking, the appendix relates more to the
Servlet 2.2 capabilities to the JSP 1.1 capabilities. The appendix is included here as this is a
feature that JSP page authors and JSP page authoring tools are interested in.
A very simple JSP page
We start with a very simple JSP page
<%@ page info="Example JSP pre compiled" %>
The JSP page packaged as source in a WAR
The JSP page can be packaged into a WAR file by just placing it at location "
" the default JSP page extension mapping will pick it up. The