Author: cbrisson
Date: Mon Jun 25 10:46:58 2018
New Revision: 1834301
URL: http://svn.apache.org/viewvc?rev=1834301&view=rev
Log:
[tools/view] Bugfix in view initialization
Modified:
velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
Modified:
velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
URL:
http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java?rev=1834301&r1=1834300&r2=1834301&view=diff
==============================================================================
---
velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
(original)
+++
velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
Mon Jun 25 10:46:58 2018
@@ -345,17 +345,17 @@ public class VelocityView extends ViewTo
if (appPropsPath != null)
{
boolean isInWebInf = appPropsPath.startsWith("/WEB-INF") ||
appPropsPath.startsWith("WEB-INF");
- Properties appProperties = getProperties(DEFAULT_PROPERTIES_PATH,
true, !isInWebInf, isInWebInf);
+ Properties appProperties = getProperties(appPropsPath, true,
!isInWebInf, isInWebInf);
getLog().debug("Configuring Velocity with properties at: {}",
appPropsPath);
velocity.setProperties(appProperties);
}
// check for a custom location for servlet-wide user props
String servletPropsPath = config.getInitParameter(PROPERTIES_KEY);
- if (servletPropsPath != null &&
!USER_PROPERTIES_PATH.equals(servletPropsPath) && (appPropsPath == null ||
!appPropsPath.equals(servletPropsPath)))
+ if (servletPropsPath != null && (appPropsPath == null ||
!appPropsPath.equals(servletPropsPath)))
{
boolean isInWebInf = servletPropsPath.startsWith("/WEB-INF") ||
servletPropsPath.startsWith("WEB-INF");
- Properties servletProperties =
getProperties(DEFAULT_PROPERTIES_PATH, true, !isInWebInf, isInWebInf);
+ Properties servletProperties = getProperties(servletPropsPath,
true, !isInWebInf, isInWebInf);
getLog().debug("Configuring Velocity with properties at: {}",
servletPropsPath);
velocity.setProperties(servletProperties);
}