1 package org.apache.turbine.modules.layouts; 2 3 18 19 import org.apache.turbine.TurbineConstants; 20 import org.apache.turbine.modules.Layout; 21 import org.apache.turbine.services.jsp.TurbineJsp; 22 import org.apache.turbine.services.jsp.util.JspNavigation; 23 import org.apache.turbine.services.jsp.util.JspScreenPlaceholder; 24 import org.apache.turbine.util.RunData; 25 26 35 public class JspLayout 36 extends Layout 37 { 38 39 private String prefix = TurbineConstants.LAYOUT_PREFIX + "/"; 40 41 47 public void doBuild(RunData data) 48 throws Exception 49 { 50 data.getResponse().setContentType("text/html"); 51 data.declareDirectResponse(); 52 53 data.getRequest() 55 .setAttribute(TurbineConstants.SCREEN_PLACEHOLDER, 56 new JspScreenPlaceholder(data)); 57 58 data.getRequest().setAttribute( 60 TurbineConstants.NAVIGATION_PLACEHOLDER, 61 new JspNavigation(data)); 62 63 String templateName = data.getTemplateInfo().getLayoutTemplate(); 65 66 TurbineJsp.handleRequest(data, prefix + templateName, true); 67 } 68 } 69 | Popular Tags |