Author: tv
Date: Mon Feb 21 22:16:51 2011
New Revision: 1073172
URL: http://svn.apache.org/viewvc?rev=1073172&view=rev
Log:
Merge updates from 2.3 branch
Modified:
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
Modified:
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
URL:
http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java?rev=1073172&r1=1073171&r2=1073172&view=diff
==============================================================================
---
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
(original)
+++
turbine/core/trunk/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
Mon Feb 21 22:16:51 2011
@@ -29,8 +29,6 @@ import java.io.Writer;
import java.util.Iterator;
import java.util.List;
-import javax.servlet.ServletConfig;
-
import org.apache.commons.collections.ExtendedProperties;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.StringUtils;
@@ -49,7 +47,7 @@ import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.event.EventCartridge;
import org.apache.velocity.app.event.MethodExceptionEventHandler;
import org.apache.velocity.context.Context;
-import org.apache.velocity.runtime.log.SimpleLog4JLogSystem;
+import org.apache.velocity.runtime.log.Log4JLogChute;
/**
* This is a Service that can process Velocity templates from within a
@@ -117,6 +115,7 @@ public class TurbineVelocityService
* @throws InitializationException Something went wrong in the init
* stage
*/
+ @Override
public void init()
throws InitializationException
{
@@ -509,7 +508,7 @@ public class TurbineVelocityService
catchErrors = conf.getBoolean(CATCH_ERRORS_KEY, CATCH_ERRORS_DEFAULT);
conf.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM_CLASS,
- SimpleLog4JLogSystem.class.getName());
+ Log4JLogChute.class.getName());
conf.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM
+ ".log4j.category", "velocity");
@@ -632,9 +631,10 @@ public class TurbineVelocityService
* @param template String template to search for
* @return True if the template can be loaded by Velocity
*/
+ @Override
public boolean templateExists(String template)
{
- return Velocity.templateExists(template);
+ return Velocity.resourceExists(template);
}
/**