1 16 17 package org.apache.jetspeed.modules.pages; 18 19 20 import org.apache.jetspeed.util.template.JetspeedTemplateNavigation; 22 23 import org.apache.turbine.util.RunData; 25 import org.apache.turbine.services.jsp.JspService; 26 import org.apache.turbine.services.TurbineServices; 27 import org.apache.turbine.services.velocity.VelocityService; 28 import org.apache.turbine.services.velocity.TurbineVelocity; 29 import org.apache.velocity.context.Context; 30 31 38 public class JetspeedJspPage extends JetspeedTemplatePage 39 { 40 41 46 protected void doBuildBeforeAction(RunData data) throws Exception 47 { 48 super.doBuildBeforeAction( data); 49 JspService jsp = (JspService)TurbineServices.getInstance() 50 .getService(JspService.SERVICE_NAME); 51 52 jsp.addDefaultObjects(data); 53 54 data.getResponse().setBufferSize(jsp.getDefaultBufferSize()); 55 56 Context context = TurbineVelocity.getContext(data); 61 TurbineVelocity.getContext(data).put("jnavigation", new JetspeedTemplateNavigation(data)); 62 data.getTemplateInfo().setTemplateContext(VelocityService.CONTEXT, context); 63 64 } 65 66 } 67 | Popular Tags |