handle / as /top
authorJean-Philippe Orsini <orsinije@fr.ibm.com>
Thu, 12 Oct 2017 16:11:03 +0000 (18:11 +0200)
committerJean-Philippe Orsini <orsinije@fr.ibm.com>
Thu, 12 Oct 2017 16:11:03 +0000 (18:11 +0200)
war/src/main/java/pnews/servlet/Pnews.java

index 01489f8..529a40e 100644 (file)
@@ -141,6 +141,11 @@ public class Pnews extends HttpServlet {
                         }
                 }
                 
+                if (path.equals("/")) {
+                        writeArticles(Category.TOP, resp);
+                        return ;
+                }
+                
                 for (Category cat: Category.values()) {
                         if (path.equals('/' + cat.getId())) {
                                 writeArticles(cat, resp);