]> WPIA git - gigi.git/blob - src/club/wpia/gigi/pages/StaticPage.java
upd: rename package name and all references to it
[gigi.git] / src / club / wpia / gigi / pages / StaticPage.java
1 package club.wpia.gigi.pages;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.InputStreamReader;
6 import java.io.UnsupportedEncodingException;
7 import java.util.HashMap;
8
9 import javax.servlet.http.HttpServletRequest;
10 import javax.servlet.http.HttpServletResponse;
11
12 import club.wpia.gigi.output.template.Template;
13
14 public class StaticPage extends Page {
15
16     private Template content;
17
18     public StaticPage(String title, InputStream content) throws UnsupportedEncodingException {
19         super(title);
20         this.content = new Template(new InputStreamReader(content, "UTF-8"));
21     }
22
23     @Override
24     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
25         HashMap<String, Object> vars = new HashMap<String, Object>();
26         content.output(resp.getWriter(), getLanguage(req), vars);
27     }
28
29 }