Author: apetrelli
Date: Thu Jul 30 13:51:55 2009
New Revision: 799266
URL: http://svn.apache.org/viewvc?rev=799266&view=rev
Log:
TILES-443
Fixed the complete container factory.
Complete the test for the complete container factory.
Added more dependencies.
Added:
tiles/framework/trunk/tiles-extras/src/test/java/org/
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
(with props)
tiles/framework/trunk/tiles-extras/src/test/resources/
tiles/framework/trunk/tiles-extras/src/test/resources/VM_global_library.vm
tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml (with
props)
tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties
(with props)
Modified:
tiles/framework/trunk/tiles-extras/pom.xml
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java
Modified: tiles/framework/trunk/tiles-extras/pom.xml
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/pom.xml?rev=799266&r1=799265&r2=799266&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-extras/pom.xml (original)
+++ tiles/framework/trunk/tiles-extras/pom.xml Thu Jul 30 13:51:55 2009
@@ -102,6 +102,13 @@
</dependency>
<dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<version>2.0.11</version>
@@ -114,6 +121,18 @@
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>2.5.6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.8</version>
Modified:
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java?rev=799266&r1=799265&r2=799266&view=diff
==============================================================================
---
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java
(original)
+++
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.java
Thu Jul 30 13:51:55 2009
@@ -151,8 +151,6 @@
velocityRenderer.setApplicationContext(applicationContext);
velocityRenderer.setAttributeEvaluatorFactory(attributeEvaluatorFactory);
velocityRenderer.setRequestContextFactory(contextFactory);
- velocityRenderer.setParameter("org.apache.velocity.toolbox",
"/WEB-INF/tools.xml");
- velocityRenderer.setParameter("org.apache.velocity.properties",
"/WEB-INF/velocity.properties");
velocityRenderer.commit();
rendererFactory.registerRenderer("velocity", velocityRenderer);
}
@@ -193,7 +191,7 @@
.getResources("/WEB-INF/**/tiles*.xml");
urlSet.addAll(applicationContext
.getResources("classpath*:META-INF/**/tiles*.xml"));
- return URLUtil.filterLocalizedTilesDefinitionURLs(urlSet);
+ return URLUtil.getBaseTilesDefinitionURLs(urlSet);
} catch (IOException e) {
throw new DefinitionsFactoryException(
"Cannot load definition URLs", e);
Added:
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java?rev=799266&view=auto
==============================================================================
---
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
(added)
+++
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
Thu Jul 30 13:51:55 2009
@@ -0,0 +1,301 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tiles.extras.complete;
+
+import static org.easymock.EasyMock.*;
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.el.ExpressionFactory;
+import javax.servlet.ServletContext;
+import javax.servlet.jsp.JspApplicationContext;
+import javax.servlet.jsp.JspFactory;
+
+import org.apache.tiles.Attribute;
+import org.apache.tiles.Definition;
+import org.apache.tiles.TilesApplicationContext;
+import org.apache.tiles.TilesContainer;
+import
org.apache.tiles.compat.definition.digester.CompatibilityDigesterDefinitionsReader;
+import org.apache.tiles.context.ChainedTilesRequestContextFactory;
+import org.apache.tiles.context.TilesRequestContextFactory;
+import org.apache.tiles.definition.pattern.PatternDefinitionResolver;
+import org.apache.tiles.definition.pattern.PrefixedPatternDefinitionResolver;
+import org.apache.tiles.evaluator.AttributeEvaluatorFactory;
+import org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory;
+import
org.apache.tiles.freemarker.context.FreeMarkerTilesRequestContextFactory;
+import org.apache.tiles.freemarker.renderer.FreeMarkerAttributeRenderer;
+import org.apache.tiles.impl.mgmt.CachingTilesContainer;
+import org.apache.tiles.jsp.context.JspTilesRequestContextFactory;
+import org.apache.tiles.locale.LocaleResolver;
+import org.apache.tiles.renderer.impl.BasicRendererFactory;
+import org.apache.tiles.renderer.impl.DefinitionAttributeRenderer;
+import org.apache.tiles.renderer.impl.StringAttributeRenderer;
+import org.apache.tiles.renderer.impl.TemplateAttributeRenderer;
+import org.apache.tiles.servlet.context.ServletTilesApplicationContext;
+import org.apache.tiles.servlet.context.ServletTilesRequestContextFactory;
+import org.apache.tiles.velocity.context.VelocityTilesRequestContextFactory;
+import org.apache.tiles.velocity.renderer.VelocityAttributeRenderer;
+import org.apache.velocity.tools.view.VelocityView;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {...@link CompleteAutoloadTilesContainerFactory}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompleteAutoloadTilesContainerFactoryTest {
+
+ /**
+ * The position of the velocity factory.
+ */
+ private static final int VELOCITY_FACTORY_POSITION = 3;
+
+ /**
+ * The number of factories.
+ */
+ private static final int FACTORIES_SIZE = 4;
+
+ /**
+ * The object to test.
+ */
+ private CompleteAutoloadTilesContainerFactory factory;
+
+ /**
+ * Initializes the object.
+ */
+ @Before
+ public void setUp() {
+ factory = new CompleteAutoloadTilesContainerFactory();
+ }
+
+ /**
+ * Test method for
+ * {...@link
CompleteAutoloadTilesContainerFactory#instantiateContainer(TilesApplicationContext)}
+ * .
+ */
+ @Test
+ public void testInstantiateContainerTilesApplicationContext() {
+ assertTrue(factory.instantiateContainer(null) instanceof
CachingTilesContainer);
+ }
+
+ /**
+ * Test method for
+ * {...@link CompleteAutoloadTilesContainerFactory
+ *
#getTilesRequestContextFactoriesToBeChained(ChainedTilesRequestContextFactory)}
+ * .
+ */
+ @Test
+ public void
testGetTilesRequestContextFactoriesToBeChainedChainedTilesRequestContextFactory()
{
+ ChainedTilesRequestContextFactory parent =
createMock(ChainedTilesRequestContextFactory.class);
+
+ replay(parent);
+ List<TilesRequestContextFactory> factories = factory
+ .getTilesRequestContextFactoriesToBeChained(parent);
+ assertEquals(FACTORIES_SIZE, factories.size());
+ assertTrue(factories.get(0) instanceof
ServletTilesRequestContextFactory);
+ assertTrue(factories.get(1) instanceof JspTilesRequestContextFactory);
+ assertTrue(factories.get(2) instanceof
FreeMarkerTilesRequestContextFactory);
+ assertTrue(factories.get(VELOCITY_FACTORY_POSITION) instanceof
VelocityTilesRequestContextFactory);
+ verify(parent);
+ }
+
+ /**
+ * Test method for
+ * {...@link CompleteAutoloadTilesContainerFactory
+ * #registerAttributeRenderers(BasicRendererFactory,
TilesApplicationContext,
+ * TilesRequestContextFactory, TilesContainer,
evaluator.AttributeEvaluatorFactory)}
+ * .
+ */
+ @SuppressWarnings("deprecation")
+ @Test
+ public void testRegisterAttributeRenderers() {
+ BasicRendererFactory rendererFactory =
createMock(BasicRendererFactory.class);
+ ServletTilesApplicationContext applicationContext =
createMock(ServletTilesApplicationContext.class);
+ TilesRequestContextFactory contextFactory =
createMock(TilesRequestContextFactory.class);
+ TilesContainer container = createMock(TilesContainer.class);
+ AttributeEvaluatorFactory attributeEvaluatorFactory =
createMock(AttributeEvaluatorFactory.class);
+ ServletContext servletContext = createMock(ServletContext.class);
+
+ rendererFactory.registerRenderer(eq("string"),
+ isA(StringAttributeRenderer.class));
+ rendererFactory.registerRenderer(eq("template"),
+ isA(TemplateAttributeRenderer.class));
+ rendererFactory.registerRenderer(eq("definition"),
+ isA(DefinitionAttributeRenderer.class));
+ rendererFactory.registerRenderer(eq("freemarker"),
+ isA(FreeMarkerAttributeRenderer.class));
+ rendererFactory.registerRenderer(eq("velocity"),
+ isA(VelocityAttributeRenderer.class));
+
+ expect(applicationContext.getContext()).andReturn(servletContext)
+ .anyTimes();
+ expect(servletContext.getInitParameter(VelocityView.PROPERTIES_KEY))
+ .andReturn(null);
+ expect(servletContext.getInitParameter(VelocityView.TOOLS_KEY))
+ .andReturn(null);
+ expect(servletContext.getAttribute(VelocityView.TOOLS_KEY)).andReturn(
+ null);
+ expect(
+ servletContext
+ .getResourceAsStream("/WEB-INF/velocity.properties"))
+ .andReturn(
+
getClass().getResourceAsStream("/velocity.properties"));
+ expect(
+ servletContext
+ .getResourceAsStream("/WEB-INF/VM_global_library.vm"))
+ .andReturn(
+
getClass().getResourceAsStream("/VM_global_library.vm"));
+ expect(servletContext.getResourceAsStream("/WEB-INF/tools.xml"))
+ .andReturn(getClass().getResourceAsStream("/tools.xml"));
+ expect(
+ servletContext
+
.getResourceAsStream(VelocityView.DEPRECATED_USER_TOOLS_PATH))
+ .andReturn(null);
+ servletContext.log((String) anyObject());
+ expectLastCall().anyTimes();
+ expect(servletContext.getRealPath("/")).andReturn(null);
+
+ replay(rendererFactory, applicationContext, contextFactory, container,
+ attributeEvaluatorFactory, servletContext);
+ factory.registerAttributeRenderers(rendererFactory, applicationContext,
+ contextFactory, container, attributeEvaluatorFactory);
+ verify(rendererFactory, applicationContext, contextFactory, container,
+ attributeEvaluatorFactory, servletContext);
+ }
+
+ /**
+ * Test method for
+ * {...@link CompleteAutoloadTilesContainerFactory
+ * #createAttributeEvaluatorFactory(TilesApplicationContext,
TilesRequestContextFactory, locale.LocaleResolver)}
+ * .
+ */
+ @Test
+ public void testCreateAttributeEvaluatorFactory() {
+ TilesApplicationContext applicationContext =
createMock(TilesApplicationContext.class);
+ TilesRequestContextFactory contextFactory =
createMock(TilesRequestContextFactory.class);
+ LocaleResolver resolver = createMock(LocaleResolver.class);
+ ServletContext servletContext = createMock(ServletContext.class);
+ JspFactory jspFactory = createMock(JspFactory.class);
+ JspApplicationContext jspApplicationContext =
createMock(JspApplicationContext.class);
+ ExpressionFactory expressionFactory =
createMock(ExpressionFactory.class);
+
+ expect(applicationContext.getContext()).andReturn(servletContext);
+
expect(jspFactory.getJspApplicationContext(servletContext)).andReturn(jspApplicationContext);
+
expect(jspApplicationContext.getExpressionFactory()).andReturn(expressionFactory);
+
+ replay(applicationContext, contextFactory, resolver, servletContext,
+ jspFactory, jspApplicationContext, expressionFactory);
+ JspFactory.setDefaultFactory(jspFactory);
+ AttributeEvaluatorFactory attributeEvaluatorFactory = factory
+ .createAttributeEvaluatorFactory(applicationContext,
+ contextFactory, resolver);
+ assertTrue(attributeEvaluatorFactory instanceof
BasicAttributeEvaluatorFactory);
+ assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("EL"));
+ assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("MVEL"));
+ assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("OGNL"));
+ verify(applicationContext, contextFactory, resolver, servletContext,
+ jspFactory, jspApplicationContext, expressionFactory);
+ }
+
+ /**
+ * Test method for
+ * {...@link
CompleteAutoloadTilesContainerFactory#createPatternDefinitionResolver(Class)}
+ * .
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testCreatePatternDefinitionResolver() {
+ PatternDefinitionResolver<Integer> resolver = factory
+ .createPatternDefinitionResolver(Integer.class);
+ assertTrue(resolver instanceof PrefixedPatternDefinitionResolver);
+ Definition definitionWildcard = new Definition("WILDCARD:blah*",
(Attribute) null, null);
+ Definition definitionRegexp = new Definition("REGEXP:what(.*)",
(Attribute) null, null);
+ Map<String, Definition> definitionMap = new HashMap<String,
Definition>();
+ definitionMap.put("WILDCARD:blah*", definitionWildcard);
+ definitionMap.put("REGEXP:what(.*)", definitionRegexp);
+ resolver.storeDefinitionPatterns(definitionMap, 1);
+ Definition result = resolver.resolveDefinition("blahX", 1);
+ assertEquals("blahX", result.getName());
+ result = resolver.resolveDefinition("whatX", 1);
+ assertEquals("whatX", result.getName());
+ }
+
+ /**
+ * Test method for
+ * {...@link
CompleteAutoloadTilesContainerFactory#getSourceURLs(TilesApplicationContext,
TilesRequestContextFactory)}
+ * .
+ * @throws IOException If something goes wrong.
+ */
+ @Test
+ public void testGetSourceURLs() throws IOException {
+ TilesApplicationContext applicationContext =
createMock(TilesApplicationContext.class);
+ TilesRequestContextFactory contextFactory =
createMock(TilesRequestContextFactory.class);
+
+ URL url1 = new URL("file:///nonexistent/tiles.xml");
+ URL url2 = new URL("file:///nonexistent/tiles_it.xml");
+ URL url3 = new URL("file:///nonexistent2/tiles.xml");
+
+ Set<URL> urls1 = new HashSet<URL>();
+ urls1.add(url1);
+ urls1.add(url2);
+
+ Set<URL> urls2 = new HashSet<URL>();
+ urls2.add(url3);
+
+
expect(applicationContext.getResources("/WEB-INF/**/tiles*.xml")).andReturn(urls1);
+
expect(applicationContext.getResources("classpath*:META-INF/**/tiles*.xml")).andReturn(urls2);
+
+ replay(applicationContext, contextFactory);
+ List<URL> urls = factory.getSourceURLs(applicationContext,
contextFactory);
+ assertEquals(2, urls.size());
+ assertTrue(urls.contains(url1));
+ assertTrue(urls.contains(url3));
+ verify(applicationContext, contextFactory);
+ }
+
+ /**
+ * Test method for
+ * {...@link CompleteAutoloadTilesContainerFactory
+ * #createDefinitionsReader(TilesApplicationContext,
TilesRequestContextFactory)}
+ * .
+ */
+ @Test
+ public void testCreateDefinitionsReader() {
+ TilesApplicationContext applicationContext =
createMock(TilesApplicationContext.class);
+ TilesRequestContextFactory contextFactory =
createMock(TilesRequestContextFactory.class);
+
+ replay(applicationContext, contextFactory);
+ assertTrue(factory.createDefinitionsReader(applicationContext,
+ contextFactory) instanceof
CompatibilityDigesterDefinitionsReader);
+ verify(applicationContext, contextFactory);
+ }
+
+}
Propchange:
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactoryTest.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added:
tiles/framework/trunk/tiles-extras/src/test/resources/VM_global_library.vm
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/test/resources/VM_global_library.vm?rev=799266&view=auto
==============================================================================
--- tiles/framework/trunk/tiles-extras/src/test/resources/VM_global_library.vm
(added)
+++ tiles/framework/trunk/tiles-extras/src/test/resources/VM_global_library.vm
Thu Jul 30 13:51:55 2009
@@ -0,0 +1,60 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+
+## Display all queued Struts errors
+#macro (errorMarkup)
+ #if ($errors.exist() )
+ <ul>
+ #foreach ($e in $errors.all )
+ $e
+ #end
+ </ul>
+ #end
+#end
+
+## Display all queued Struts errors for a particular property
+#macro (errorMarkupForProperty $property)
+ #if ($errors.exist($property) )
+ <ul>
+ #foreach ($er in $errors.get($property))
+ $er
+ #end
+ </ul>
+ #end
+#end
+
+## Display all queued Struts errors
+#macro (messageMarkup)
+ #if ($messages.exist() )
+ <ul>
+ #foreach ($m in $messages.all )
+ $m
+ #end
+ </ul>
+ #end
+#end
+
+## Display all queued Struts action messages for a particular property
+#macro (messageMarkupForProperty $property)
+ #if ($messages.exist($property) )
+ <ul>
+ #foreach ($m in $messages.get($property))
+ $m
+ #end
+ </ul>
+ #end
+#end
Added: tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml?rev=799266&view=auto
==============================================================================
--- tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml (added)
+++ tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml Thu Jul 30
13:51:55 2009
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<tools>
+ <toolbox scope="request">
+ <tool class="org.apache.velocity.tools.generic.ContextTool"/>
+ </toolbox>
+ <toolbox scope="application">
+ <tool class="org.apache.velocity.tools.generic.EscapeTool"/>
+ </toolbox>
+</tools>
Propchange: tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tiles/framework/trunk/tiles-extras/src/test/resources/tools.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties
URL:
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties?rev=799266&view=auto
==============================================================================
--- tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties
(added)
+++ tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties
Thu Jul 30 13:51:55 2009
@@ -0,0 +1,114 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# ----------------------------------------------------------------------------
+# These are the default properties for the
+# Velocity Runtime. These values are used when
+# Runtime.init() is called, and when Runtime.init(properties)
+# fails to find the specificed properties file.
+# ----------------------------------------------------------------------------
+
+
+# ----------------------------------------------------------------------------
+# R U N T I M E L O G
+# ----------------------------------------------------------------------------
+# Velocity uses the Servlet APIs logging facilites.
+
+# ----------------------------------------------------------------------------
+# This controls if Runtime.error(), info() and warn() messages include the
+# whole stack trace. The last property controls whether invalid references
+# are logged.
+# ----------------------------------------------------------------------------
+
+runtime.log.invalid.reference = true
+
+
+# ----------------------------------------------------------------------------
+# T E M P L A T E E N C O D I N G
+# ----------------------------------------------------------------------------
+
+input.encoding=ISO-8859-1
+output.encoding=ISO-8859-1
+
+
+# ----------------------------------------------------------------------------
+# F O R E A C H P R O P E R T I E S
+# ----------------------------------------------------------------------------
+# These properties control how the counter is accessed in the #foreach
+# directive. By default the reference $velocityCount will be available
+# in the body of the #foreach directive. The default starting value
+# for this reference is 1.
+# ----------------------------------------------------------------------------
+
+directive.foreach.counter.name = velocityCount
+directive.foreach.counter.initial.value = 1
+
+
+# ----------------------------------------------------------------------------
+# I N C L U D E P R O P E R T I E S
+# ----------------------------------------------------------------------------
+# These are the properties that governed the way #include'd content
+# is governed.
+# ----------------------------------------------------------------------------
+
+directive.include.output.errormsg.start = <!-- include error :
+directive.include.output.errormsg.end = see error log -->
+
+
+# ----------------------------------------------------------------------------
+# P A R S E P R O P E R T I E S
+# ----------------------------------------------------------------------------
+
+directive.parse.max.depth = 10
+
+
+# ----------------------------------------------------------------------------
+# VELOCIMACRO PROPERTIES
+# ----------------------------------------------------------------------------
+# global : name of default global library. It is expected to be in the regular
+# template path. You may remove it (either the file or this property) if
+# you wish with no harm.
+# ----------------------------------------------------------------------------
+# dev-changes by Marino
+webapp.resource.loader.cache = true
+webapp.resource.loader.modificationCheckInterval = 5
+velocimacro.library.autoreload = false
+velocimacro.library = /WEB-INF/VM_global_library.vm
+
+velocimacro.permissions.allow.inline = true
+velocimacro.permissions.allow.inline.to.replace.global = false
+velocimacro.permissions.allow.inline.local.scope = false
+
+velocimacro.context.localscope = false
+
+# ----------------------------------------------------------------------------
+# INTERPOLATION
+# ----------------------------------------------------------------------------
+# turn off and on interpolation of references and directives in string
+# literals. ON by default :)
+# ----------------------------------------------------------------------------
+runtime.interpolate.string.literals = true
+
+
+# ----------------------------------------------------------------------------
+# RESOURCE MANAGEMENT
+# ----------------------------------------------------------------------------
+# Allows alternative ResourceManager and ResourceCache implementations
+# to be plugged in.
+# ----------------------------------------------------------------------------
+resource.manager.class =
org.apache.velocity.runtime.resource.ResourceManagerImpl
+resource.manager.cache.class =
org.apache.velocity.runtime.resource.ResourceCacheImpl
Propchange:
tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tiles/framework/trunk/tiles-extras/src/test/resources/velocity.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL