Commit 723426cc authored by Deniz Tosoni's avatar Deniz Tosoni

Added table view output (unsorted)

parent 5226fab8
......@@ -51,14 +51,15 @@
<% } %>
<br/>
</div>
<%
Map<String, Integer> wordMap = (Map) request.getAttribute("getWordFrequencyresult");
StringBuilder htmlBuilder = new StringBuilder();
htmlBuilder.append("<table>");
htmlBuilder.append("<table class=\"table\">");
htmlBuilder.append("<thead class=\"thead-dark\">");
htmlBuilder.append("<th scope=\"col\">Subsequence</th>");
htmlBuilder.append("<th scope=\"col \">Count</th>");
for (Map.Entry<String, Integer> entry : wordMap.entrySet()) {
htmlBuilder.append(String.format("<tr><td>%s</td><td>%d</td></tr>",
......@@ -68,8 +69,8 @@
htmlBuilder.append("</table>");
String html = htmlBuilder.toString();
out.println(html);
%>
out.write(html)
<!-- Modal -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment