<%@ page import="java.util.Date" %> <%! int a = 15; int counter = 0; %>
<% out.println("

Hallo Welt! von JSP aus A5

"); out.println("

Query String: " + request.getQueryString() + "

"); for (int i = 10; i < a; i++) { out.println("

Paragraph " + i + " aus JSP

"); } Date d = new Date(); out.println("
"); out.println("

Page displayed on " + d + "

"); synchronized (this) { counter++; } String[] parms = request.getParameterValues("x"); if ( parms != null ) { for ( int j = 0; j < parms.length; j++ ) { out.println("

x = " + parms[j] + "

"); } } out.println("

Page accessed " + counter + " times since container reload.

"); out.println("

Page served from " + System.getProperty("os.name") + " Version " + System.getProperty("os.version") + "

"); %>
weiter