1 13 package info.magnolia.module.admininterface; 14 15 import java.io.IOException ; 16 17 import javax.servlet.http.HttpServletRequest ; 18 import javax.servlet.http.HttpServletResponse ; 19 20 21 26 public abstract class SimplePageMVCHandler extends PageMVCHandler { 27 28 33 public SimplePageMVCHandler(String name, HttpServletRequest request, HttpServletResponse response) { 34 super(name, request, response); 35 } 36 37 41 public void renderHtml(String view) throws IOException { 42 if (VIEW_SHOW.equals(view)) { 43 try { 44 render(getRequest(), getResponse()); 45 } 46 catch (Exception e) { 47 log.error("Exception during rendering the page", e); 48 e.printStackTrace(getResponse().getWriter()); 49 } 50 } 51 } 52 53 59 protected abstract void render(HttpServletRequest request, HttpServletResponse response) throws Exception ; 60 61 } 62 | Popular Tags |