count the number of hits per articles
[pnews.git] / war / src / main / java / pnews / HTML.java
index ee367dc..9478fa2 100644 (file)
@@ -85,6 +85,7 @@ public class HTML {
        
        public static String toHTML(List<Article> articles, Category catActive) {
                StringBuffer buf;
+               int i;
                
                buf = new StringBuffer();
                buf.append("<!DOCTYPE html>\n");
@@ -98,8 +99,14 @@ public class HTML {
                
                appendMenu(buf, catActive);
                
-               for (Article e: articles)
+               i = 0;
+               for (Article e: articles) {
                        append(buf, e);
+                       if (i == 100)
+                               break;
+                       else
+                               i++;
+               }
                
                buf.append("</body>\n");
                buf.append("</html>\n");