%@ page import="uk.org.mafoo.wordsearch.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<%
int height = Integer.parseInt(request.getParameter("height"));
int width = Integer.parseInt(request.getParameter("width"));
boolean simple = request.getParameter("simple") != null;
String name = StringEscapeUtils.escapeHtml(request.getParameter("name"));
if (request.getParameter("words").length() > 2048) { throw new Exception("Input too large"); }
if (height > 100 || width > 100) { throw new Exception("Dimentions too large"); }
List<%= name %>
Grid
<% for(char[] row : grid) { %>
<% for(char c : row) {
csv += "" + c + ',';
%>
<%
csv += "\\n";
}
%>
<%= c %>
<% } %>
Words
<% for (String word : words) { %>