Dynamische Generatoren
import...;
public class
_0002fSimpleJsp_0002ejspSimpleJsp_jsp_0
extends HttpJspBase {
//....
public void
_jspService(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
//...
ServletConfig config = null;
JspWriter out = null;
// ...
out = pageContext.getOut();
out.write("<html>\r\n<head>\r\n<title>Simple
JSP</title>\r\n</head>\r\n<body>\r\n
<h1>Hello World</h1>\r\n
It's ");
out.print( new java.util.Date()
);
out.print("</body>\r\n</html>\r\n");
// end
// ...
}
}
<%@page language=“java“%>
<html>
<head>
<title>Simple JSP
</title>
</head>
<body>
<h1>Hello World
!</h1>
It's
<%= new
java.util.Date()%>
</body>
</html>
Java-Compiler
Beispiel Server Pages: