rp.getWriter().write(html);
} else {
LOG.severe("writeArticles cannot retrieve any articles");
- html = HTML.toHTML(new ArrayList<>(), cat);
+ html = HTML.toHTML(new ArrayList<Article>(), cat);
rp.setContentType("text/html");
rp.getWriter().write(html);
}
}
}
+ if (path.equals("/")) {
+ writeArticles(Category.TOP, resp);
+ return ;
+ }
+
for (Category cat: Category.values()) {
if (path.equals('/' + cat.getId())) {
writeArticles(cat, resp);