|
NOTE:
These slides have not been updated since 2003. They have been superseded by the book
Anders Møller and Michael Schwartzbach, February 2006 |
|
| INTERACTIVE WEB SERVICES WITH JAVA |
|
Another Hello-World example:
<% response.addDateHeader("Expires", 0); %>
<html><head><title>JSP</title></head>
<body><h1>Hello World!</h1>
<%! private int hits = 0; %>
You are visitor number <% synchronized(this) { out.println(++hits); } %>
since the last time the service was restarted.
<p>
This page was last updated: <%= new java.util.Date().toLocaleString() %>
</body></html>
|
Note that only an expert Java programmer could write this:
Inserting code in XML templates:
Alternative XML syntax:
Pre-declared variables:
Directives:
|
| COPYRIGHT © 2002-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH |
|