1 package org.cacert.gigi.pages;
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;
9 import javax.servlet.http.HttpServletRequest;
10 import javax.servlet.http.HttpServletResponse;
12 import org.cacert.gigi.output.template.Template;
14 public class StaticPage extends Page {
16 private Template content;
18 public StaticPage(String title, InputStream content) throws UnsupportedEncodingException {
20 this.content = new Template(new InputStreamReader(content, "UTF-8"));
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);