1 package org.apache.turbine.services.jsp.util; 2 3 18 19 import org.apache.commons.logging.Log; 20 import org.apache.commons.logging.LogFactory; 21 22 import org.apache.turbine.modules.ScreenLoader; 23 import org.apache.turbine.services.template.TurbineTemplate; 24 import org.apache.turbine.util.RunData; 25 26 41 public class JspScreenPlaceholder 42 { 43 44 private static Log log = LogFactory.getLog(JspNavigation.class); 45 46 47 private RunData data; 48 49 54 public JspScreenPlaceholder(RunData data) 55 { 56 this.data = data; 57 } 58 59 62 public void exec() 63 { 64 String template = null; 65 String module = null; 66 try 67 { 68 template = data.getTemplateInfo().getScreenTemplate(); 69 module = TurbineTemplate.getScreenName(template); 70 ScreenLoader.getInstance().exec(data, module); 71 } 72 catch (Exception e) 73 { 74 String message = "Error processing navigation template:" + 75 template + " using module: " + module; 76 log.error(message, e); 77 try 78 { 79 data.getOut().print("Error processing navigation template: " 80 + template + " using module: " + module); 81 } 82 catch (java.io.IOException ioe) 83 { 84 } 85 } 86 } 87 } 88 | Popular Tags |