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