]> WPIA git - gigi.git/blob - src/club/wpia/gigi/pages/MainPage.java
fix: ResultSet.getDate is often wrong as it fetches day-precision times
[gigi.git] / src / club / wpia / gigi / pages / MainPage.java
1 package club.wpia.gigi.pages;
2
3 import java.io.IOException;
4 import java.util.HashMap;
5
6 import javax.servlet.http.HttpServletRequest;
7 import javax.servlet.http.HttpServletResponse;
8
9 import club.wpia.gigi.output.template.Template;
10
11 public class MainPage extends Page {
12
13     private static final Template notLog = new Template(MainPage.class.getResource("MainPageNotLogin.templ"));
14
15     public MainPage() {
16         super("Home");
17     }
18
19     @Override
20     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
21         if (LoginPage.getUser(req) != null) {
22             getDefaultTemplate().output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
23         } else {
24             notLog.output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
25         }
26     }
27
28     @Override
29     public boolean needsLogin() {
30         return false;
31     }
32 }