JSP Tags
Including Java Code
The tags for including java code in a JSP are <% %>
.
<%
int x = 0;
x++;
%>
Including a File
There are two tags for including files.
-
<%@ include file="/path/from/wep/app/root/to/file" %>
-
This will include the file into the current JSP before the servlet is generated
for the JSP.
-
<jsp:include page="/path/from/web/app/root/to/file" />
-
This will include the output of the file at runtime. If the file is a JSP,
then the output genereated from the JSP will be included in the output of
current JSP.