1 <%@page contentType="text/html" pageEncoding="UTF-8" session="false" buffer="1kb" %>
2 <%@page import="java.util.Map" %>
3 <%@page import="java.util.Date"%>
4 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9 <title>Page, that is handled by a controller</title>
12 <% Map<Date,String> requests = (Map<Date,String>)request.getAttribute("requests");
13 if (requests == null) { %>
14 <h1 style="color: red">This page associated with a controller and should be viewed as such!</h1>
15 <p style="color: red">Go to: <a href="/spring-controller.html">/spring-controller.html</a></p>
17 <h1>Controlled Page</h1>
18 <form action="/spring-controller.html">
19 <label for="max-age">Max Age:</label>
20 <input type="text" name="max-age" value="<% if (request.getParameter("max-age") != null) { %><%= request.getParameter("max-age") %><% } %>" />
23 <p>(Uncached) requests so far:</p>
25 <% for(Map.Entry<Date,String> entry : requests.entrySet()) { %>
27 <%= entry.getKey() %>:
28 <% if (entry.getValue().equals("")) { %>
29 <a href="/spring-controller.html">No parameters...</a>
31 <a href="/spring-controller.html?<%= entry.getValue() %>">
32 <% for (String parameter : entry.getValue().split("&")) { %>
33 <strong><%= parameter %></strong>
41 <p>This page was delivered via SPRING!</p>