fix missing content-type

This commit is contained in:
Sebastian Sdorra
2011-04-18 18:57:55 +02:00
parent 1dd3f429e5
commit abdc256a0d

View File

@@ -63,6 +63,12 @@ import javax.servlet.http.HttpServletResponse;
public class TemplateServlet extends HttpServlet
{
/** Field description */
public static final String CONTENT_TYPE = "text/html";
/** Field description */
public static final String ENCODING = "UTF-8";
/** Field description */
private static final long serialVersionUID = 3578555653924091546L;
@@ -132,6 +138,8 @@ public class TemplateServlet extends HttpServlet
try
{
response.setCharacterEncoding(ENCODING);
response.setContentType(CONTENT_TYPE);
writer = response.getWriter();
templateHandler.render(templateName, writer, params);
}