2 package eu
.etaxonomy
.cdm
.remote
.view
;
7 import javax
.servlet
.http
.HttpServletRequest
;
8 import javax
.servlet
.http
.HttpServletResponse
;
10 import org
.springframework
.web
.servlet
.View
;
12 import eu
.etaxonomy
.cdm
.common
.DocUtils
;
14 public class HtmlView
implements View
{
17 public String
getContentType() {
21 @SuppressWarnings("unchecked")
22 public void render(Map arg0
, HttpServletRequest arg1
, HttpServletResponse response
) throws Exception
{
23 response
.setContentType(getContentType());
24 response
.setCharacterEncoding("UTF-8");
25 Writer out
= response
.getWriter();
26 if(arg0
.get("html") != null) {
27 out
.append(arg0
.get("html").toString());
29 out
.append("<html><head><title>").append(arg0
.get("title").toString()).append("</title></head><body>");
30 out
.append(arg0
.get("body").toString());
31 out
.append("<body></html>");
33 response
.flushBuffer();