You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/06/14 16:39:49 UTC

cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/freemarker TurbineFreeMarkerService.java

jvanzyl     01/06/14 07:39:49

  Modified:    src/java/org/apache/turbine/services/freemarker
                        TurbineFreeMarkerService.java
  Log:
  - updating service as per notes.
  
  Revision  Changes    Path
  1.15      +4 -9      jakarta-turbine/src/java/org/apache/turbine/services/freemarker/TurbineFreeMarkerService.java
  
  Index: TurbineFreeMarkerService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/freemarker/TurbineFreeMarkerService.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TurbineFreeMarkerService.java	2001/03/31 16:12:53	1.14
  +++ TurbineFreeMarkerService.java	2001/06/14 14:39:48	1.15
  @@ -67,15 +67,12 @@
   import org.apache.turbine.om.security.*;
   import org.apache.turbine.services.*;
   import org.apache.turbine.services.resources.*;
  -import org.apache.turbine.services.servlet.TurbineServlet;
   
   import org.apache.ecs.StringElement;
   
   // FreeMarker Stuff
   import freemarker.template.*;
   
  -import org.apache.velocity.runtime.configuration.Configuration;
  -
   /*
    * This is a Service that can process FreeMarker templates from within
    * a Turbine Screen.  Here's an example of how you might use it from a
  @@ -92,10 +89,10 @@
    *
    * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
  - * @version $Id: TurbineFreeMarkerService.java,v 1.14 2001/03/31 16:12:53 jvanzyl Exp $
  + * @version $Id: TurbineFreeMarkerService.java,v 1.15 2001/06/14 14:39:48 jvanzyl Exp $
    */
   public class TurbineFreeMarkerService
  -    extends TurbineBaseService
  +    extends BaseService
       implements FreeMarkerService, CacheListener
   {
       /** A cache to store parsed templates. */
  @@ -383,12 +380,10 @@
        */
       private void initFreeMarker() throws Exception
       {
  -        Configuration config = getConfiguration();
  -
  -        path = config.getString("templates", "/templates");
  +        path = getConfiguration().getString("templates", "/templates");
   
           // If possible, transform paths to be webapp root relative.
  -        path = TurbineServlet.getRealPath(path);
  +        path = getRealPath(path);
   
           // Store the converted path in service properties for Turbine
           // based providers.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org