Basic

<html>
<head>
    <title>A Simple JSP Page</title>
</head>
<body>
<pre>

This is template text; it is automatically written to the output
stream.

<hr>

<%-- This is a JSP comment --%>
For more information, see Commenting a JSP Page

<hr>

<%
    // This is a scriptlet; it contains Java code
    // For more information, see Running Java Code in a JSP Page
%>

<hr>

The following is a JSP expression; it is used to emit dynamic
text to the output stream:
The current date is <%= new java.util.Date() %>
For more information, see Generating Dynamic Content on a JSP Page

<hr>

The following is a directive that includes other files:
<%@ include file="fragment.jsp" %>
For more information, see Including a File in a JSP Page

</pre>
</body>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.