PrintWriter pw = response.getWriter();
pw.println("<table class='content' cellpadding='0' cellspacing='0' width='100%'>");
MapEntries mapEntries = resolverFactory.getMapEntries();
title(
pw,
"Configuration Test",
"To test the configuration, enter an URL or a resource path into the field and click 'Resolve' to resolve the URL or click 'Map' to map the resource path");
pw.println("<tr class='content'>");
pw.println("<td class='content'>Test</td>");
pw.print("<td class='content' colspan='2'>");
pw.print("<form method='post'>");
pw.println("<input type='text' name='" + ATTR_TEST + "' value='" + test
+ "' class='input' size='50'>");
pw.println(" <input type='submit' name='" + ATTR_SUBMIT
+ "' value='Resolve' class='submit'>");
pw.println(" <input type='submit' name='" + ATTR_SUBMIT
+ "' value='Map' class='submit'>");
pw.print("</form>");
pw.print("</td>");
pw.println("</tr>");
if (result != null) {
pw.println("<tr class='content'>");
pw.println("<td class='content'> </td>");
pw.println("<td class='content' colspan='2'>" + result + "</td>");
pw.println("</tr>");
}
separator(pw);
dumpMap(
pw,
"Resolver Map Entries",
"Lists the entries used by the ResourceResolver.resolve methods to map URLs to Resources",
mapEntries.getResolveMaps());
separator(pw);
dumpMap(
pw,
"Mapping Map Entries",
"Lists the entries used by the ResourceResolver.map methods to map Resource Paths to URLs",
mapEntries.getMapMaps());
pw.println("</table>");
}