previous | top | next

JSP Syntax


JSP looks very much like HTML. In fact, any legal HTML document is also a legal JSP. JSPs allow you to include dynamic content using the following syntactic elements. The JSP Syntax chart (http://java.sun.com/products/jsp/pdf/card11a.pdf) provides a handy reference to JSP syntactic elements.

Here is a simple JSP page that displays the current date and time:

<html>
<head><title>Current Date and Time</title></head>
<body>
Hello, the current time is <%=new java.util.Date()%>
</body>
</html>

Copyright (c) Jason Voegele. All rights reserved.


jason@jvoegele.com