]> WPIA git - gigi.git/blob - src/club/wpia/gigi/pages/StaticPage.java
Merge "upd: remove 'browser install'"
[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
8 import javax.servlet.http.HttpServletRequest;
9 import javax.servlet.http.HttpServletResponse;
10
11 import club.wpia.gigi.output.template.Template;
12
13 public class StaticPage extends Page {
14
15     private Template content;
16
17     public StaticPage(String title, InputStream content) throws UnsupportedEncodingException {
18         super(title);
19         this.content = new Template(new InputStreamReader(content, "UTF-8"));
20     }
21
22     @Override
23     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
24         content.output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
25     }
26
27 }