WW-5047 Upgrades to VelocityEngine 2.1 and VelocityTools 3.0
diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml
index 99bceb7..dc0ca61 100644
--- a/apps/showcase/pom.xml
+++ b/apps/showcase/pom.xml
@@ -122,17 +122,6 @@
<version>${log4j2.version}</version>
</dependency>
- <!-- Velocity -->
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- </dependency>
-
<dependency>
<groupId>opensymphony</groupId>
<artifactId>sitemesh</artifactId>
diff --git a/bundles/demo/pom.xml b/bundles/demo/pom.xml
index 4ea5410..b9bec99 100644
--- a/bundles/demo/pom.xml
+++ b/bundles/demo/pom.xml
@@ -34,14 +34,8 @@
<dependencies>
<dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- <optional>true</optional>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-velocity-plugin</artifactId>
</dependency>
<dependency>
diff --git a/core/pom.xml b/core/pom.xml
index f74a3fe..f6038f6 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -203,19 +203,6 @@
<artifactId>ognl</artifactId>
</dependency>
- <!-- Velocity -->
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- <optional>true</optional>
- </dependency>
-
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
diff --git a/core/src/main/java/org/apache/struts2/views/TagLibraryDirectiveProvider.java b/core/src/main/java/org/apache/struts2/views/TagLibraryDirectiveProvider.java
index 7636846..ccc8e4b 100644
--- a/core/src/main/java/org/apache/struts2/views/TagLibraryDirectiveProvider.java
+++ b/core/src/main/java/org/apache/struts2/views/TagLibraryDirectiveProvider.java
@@ -36,6 +36,6 @@
*
* @return A list of Velocity directive classes
*/
- List<Class> getDirectiveClasses();
+ List<Class<?>> getDirectiveClasses();
}
diff --git a/core/src/main/java/org/apache/struts2/views/util/ContextUtil.java b/core/src/main/java/org/apache/struts2/views/util/ContextUtil.java
index e530fa8..8d493f6 100644
--- a/core/src/main/java/org/apache/struts2/views/util/ContextUtil.java
+++ b/core/src/main/java/org/apache/struts2/views/util/ContextUtil.java
@@ -41,9 +41,7 @@
*/
public class ContextUtil {
public static final String REQUEST = "request";
- public static final String REQUEST2 = "request";
public static final String RESPONSE = "response";
- public static final String RESPONSE2 = "response";
public static final String SESSION = "session";
public static final String BASE = "base";
public static final String STACK = "stack";
@@ -51,12 +49,10 @@
public static final String STRUTS = "struts";
public static final String ACTION = "action";
- public static Map getStandardContext(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- HashMap map = new HashMap();
+ public static Map<String, Object> getStandardContext(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+ HashMap<String, Object> map = new HashMap<>();
map.put(REQUEST, req);
- map.put(REQUEST2, req);
map.put(RESPONSE, res);
- map.put(RESPONSE2, res);
map.put(SESSION, req.getSession(false));
map.put(BASE, req.getContextPath());
map.put(STACK, stack);
diff --git a/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java b/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java
index 8cfc3f4..5d0843b 100644
--- a/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java
+++ b/core/src/test/java/org/apache/struts2/util/InvocationSessionStoreTest.java
@@ -19,6 +19,7 @@
package org.apache.struts2.util;
import com.mockobjects.dynamic.Mock;
+import com.mockobjects.servlet.MockPageContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
@@ -31,7 +32,6 @@
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.Map;
-import org.apache.struts.mock.MockPageContext;
import org.apache.struts2.ServletActionContext;
diff --git a/plugins/embeddedjsp/pom.xml b/plugins/embeddedjsp/pom.xml
index 9e69fca..ce459dc 100644
--- a/plugins/embeddedjsp/pom.xml
+++ b/plugins/embeddedjsp/pom.xml
@@ -37,6 +37,10 @@
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-velocity-plugin</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
diff --git a/plugins/embeddedjsp/src/test/resources/org/apache/struts2/complex0.jsp b/plugins/embeddedjsp/src/test/resources/org/apache/struts2/complex0.jsp
index 263a142..184ce17 100644
--- a/plugins/embeddedjsp/src/test/resources/org/apache/struts2/complex0.jsp
+++ b/plugins/embeddedjsp/src/test/resources/org/apache/struts2/complex0.jsp
@@ -27,12 +27,11 @@
<%@ page import="com.opensymphony.xwork2.util.TextParseUtil" %>
<%@ page import="com.opensymphony.xwork2.util.WildcardUtil" %>
<%@ page import="org.apache.struts2.StrutsConstants" %>
-<%@ page import="org.apache.struts2.StrutsConstants" %>
<%@ page import="org.apache.struts2.util.ComponentUtils" %>
<%@ page import="org.apache.struts2.util.ContainUtil" %>
<%@ page import="org.apache.struts2.util.StrutsUtil" %>
<%@ page import="org.apache.struts2.util.URLDecoderUtil" %>
-<%@ page import="org.apache.struts2.util.VelocityStrutsUtil" %>
+<%@ page import="org.apache.struts2.views.velocity.VelocityStrutsUtil" %>
<%@ taglib prefix="r" uri="http://jakarta.apache.org/taglibs/request-1.0" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
diff --git a/plugins/portlet/pom.xml b/plugins/portlet/pom.xml
index 81f08b6..c5198b8 100644
--- a/plugins/portlet/pom.xml
+++ b/plugins/portlet/pom.xml
@@ -70,19 +70,6 @@
<artifactId>commons-lang3</artifactId>
</dependency>
- <!-- Velocity -->
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- <optional>true</optional>
- </dependency>
-
<!-- Portlet -->
<dependency>
<groupId>javax.portlet</groupId>
diff --git a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
index 7d3b7c9..7fd2265 100644
--- a/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
+++ b/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/VelocityDecoratorServlet.java
@@ -89,7 +89,7 @@
// we can get these now that velocity is initialized
defaultContentType = getVelocityProperty(VelocityView.CONTENT_TYPE_KEY, VelocityView.DEFAULT_CONTENT_TYPE);
- String encoding = getVelocityProperty(RuntimeConstants.OUTPUT_ENCODING, VelocityView.DEFAULT_OUTPUT_ENCODING);
+ String encoding = getVelocityProperty(RuntimeConstants.ENCODING_DEFAULT, VelocityView.DEFAULT_OUTPUT_ENCODING);
// For non Latin-1 encodings, ensure that the charset is
// included in the Content-Type header.
diff --git a/plugins/velocity/pom.xml b/plugins/velocity/pom.xml
index 649e1d4..8da8e57 100644
--- a/plugins/velocity/pom.xml
+++ b/plugins/velocity/pom.xml
@@ -36,12 +36,17 @@
<!-- Velocity -->
<dependency>
<groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
+ <artifactId>velocity-engine-core</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
+ <groupId>org.apache.velocity.tools</groupId>
+ <artifactId>velocity-tools-view</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.velocity.tools</groupId>
+ <artifactId>velocity-tools-view-jsp</artifactId>
</dependency>
<dependency>
diff --git a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java
index f8f6075..62ac6c7 100644
--- a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java
+++ b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/StrutsVelocityContext.java
@@ -22,21 +22,23 @@
import com.opensymphony.xwork2.util.ValueStack;
+import java.util.List;
+
public class StrutsVelocityContext extends VelocityContext {
- ValueStack stack;
- VelocityContext[] chainedContexts;
+ private ValueStack stack;
+ private List<VelocityContext> chainedContexts;
public StrutsVelocityContext(ValueStack stack) {
this(null, stack);
}
- public StrutsVelocityContext(VelocityContext[] chainedContexts, ValueStack stack) {
+ public StrutsVelocityContext(List<VelocityContext> chainedContexts, ValueStack stack) {
this.chainedContexts = chainedContexts;
this.stack = stack;
}
- public boolean internalContainsKey(Object key) {
+ public boolean internalContainsKey(String key) {
boolean contains = super.internalContainsKey(key);
// first let's check to see if we contain the requested key
@@ -46,13 +48,13 @@
// if not, let's search for the key in the ognl value stack
if (stack != null) {
- Object o = stack.findValue(key.toString());
+ Object o = stack.findValue(key);
if (o != null) {
return true;
}
- o = stack.getContext().get(key.toString());
+ o = stack.getContext().get(key);
if (o != null) {
return true;
}
diff --git a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
index 6cbbaed..942609d 100644
--- a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
+++ b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
@@ -28,7 +28,6 @@
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsException;
-import org.apache.struts2.util.VelocityStrutsUtil;
import org.apache.struts2.views.TagLibraryDirectiveProvider;
import org.apache.struts2.views.jsp.ui.OgnlTool;
import org.apache.struts2.views.util.ContextUtil;
@@ -36,9 +35,9 @@
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
-import org.apache.velocity.tools.view.ToolboxManager;
-import org.apache.velocity.tools.view.context.ChainedContext;
-import org.apache.velocity.tools.view.servlet.ServletToolboxManager;
+import org.apache.velocity.tools.ToolContext;
+import org.apache.velocity.tools.ToolManager;
+import org.apache.velocity.tools.ToolboxFactory;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
@@ -47,7 +46,13 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
/**
* Manages the environment for Velocity result types
@@ -67,7 +72,7 @@
/**
* A reference to the toolbox manager.
*/
- protected ToolboxManager toolboxManager = null;
+ protected ToolManager toolboxManager = null;
private String toolBoxLocation;
/**
@@ -98,7 +103,7 @@
/**
* @return a reference to the VelocityEngine used by <b>all</b> struts velocity thingies with the exception of
- * directly accessed *.vm pages
+ * directly accessed *.vm pages
*/
public VelocityEngine getVelocityEngine() {
return velocityEngine;
@@ -120,22 +125,19 @@
* </ul>
*
* @param stack the current {@link ValueStack}
- * @param req the current HttpServletRequest
- * @param res the current HttpServletResponse
+ * @param req the current HttpServletRequest
+ * @param res the current HttpServletResponse
* @return a new StrutsVelocityContext
*/
public Context createContext(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- Context result = null;
- VelocityContext[] chainedContexts = prepareChainedContexts(req, res, stack.getContext());
+ List<VelocityContext> chainedContexts = prepareChainedContexts(req, res, stack.getContext());
StrutsVelocityContext context = new StrutsVelocityContext(chainedContexts, stack);
- Map standardMap = ContextUtil.getStandardContext(stack, req, res);
- for (Object o : standardMap.entrySet()) {
- Map.Entry entry = (Map.Entry) o;
- context.put((String) entry.getKey(), entry.getValue());
+ Map<String, Object> standardMap = ContextUtil.getStandardContext(stack, req, res);
+ for (Map.Entry<String, Object> entry : standardMap.entrySet()) {
+ context.put(entry.getKey(), entry.getValue());
}
context.put(STRUTS, new VelocityStrutsUtil(velocityEngine, context, stack, req, res));
-
ServletContext ctx = null;
try {
ctx = ServletActionContext.getServletContext();
@@ -144,9 +146,10 @@
LOG.debug("internal toolbox context ignored");
}
+ Context result;
if (toolboxManager != null && ctx != null) {
- ChainedContext chained = new ChainedContext(context, velocityEngine, req, res, ctx);
- chained.setToolbox(toolboxManager.getToolbox(chained));
+ ToolContext chained = new ToolContext(velocityEngine);
+ chained.addToolbox(toolboxManager.getToolboxFactory().createToolbox(ToolboxFactory.DEFAULT_SCOPE));
result = chained;
} else {
result = context;
@@ -161,32 +164,24 @@
* perform any initialization of the contexts. All that must be done in the
* context itself.
*
- * @param servletRequest the servlet request object
+ * @param servletRequest the servlet request object
* @param servletResponse the servlet response object
- * @param extraContext map with extra context
+ * @param extraContext map with extra context
* @return an VelocityContext[] of contexts to chain
*/
- protected VelocityContext[] prepareChainedContexts(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Map extraContext) {
- if (this.chainedContextNames == null) {
- return null;
- }
- List contextList = new ArrayList();
- for (int i = 0; i < chainedContextNames.length; i++) {
- String className = chainedContextNames[i];
- try {
- VelocityContext velocityContext = (VelocityContext) objectFactory.buildBean(className, null);
- contextList.add(velocityContext);
- } catch (Exception e) {
- LOG.warn("Warning. {} caught while attempting to instantiate a chained VelocityContext, {} -- skipping", e.getClass().getName(), className);
+ protected List<VelocityContext> prepareChainedContexts(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Map<String, Object> extraContext) {
+ List<VelocityContext> contextList = new ArrayList<>();
+ if (this.chainedContextNames != null) {
+ for (String className : chainedContextNames) {
+ try {
+ VelocityContext velocityContext = (VelocityContext) objectFactory.buildBean(className, extraContext);
+ contextList.add(velocityContext);
+ } catch (Exception e) {
+ LOG.warn("Warning. {} caught while attempting to instantiate a chained VelocityContext, {} -- skipping", e.getClass().getName(), className);
+ }
}
}
- if (contextList.size() > 0) {
- VelocityContext[] extraContexts = new VelocityContext[contextList.size()];
- contextList.toArray(extraContexts);
- return extraContexts;
- } else {
- return null;
- }
+ return contextList;
}
/**
@@ -341,7 +336,7 @@
this.toolBoxLocation = toolboxLocation;
}
- public ToolboxManager getToolboxManager() {
+ public ToolManager getToolboxManager() {
return toolboxManager;
}
@@ -373,15 +368,14 @@
/**
* Initializes the ServletToolboxManager for this servlet's
* toolbox (if any).
- *
- * @param context the servlet context
*/
- protected void initToolbox(ServletContext context) {
- /* if we have a toolbox, get a manager for it */
+ protected void initToolbox(ServletContext servletContext) {
if (StringUtils.isNotBlank(toolBoxLocation)) {
- toolboxManager = ServletToolboxManager.getInstance(context, toolBoxLocation);
+ LOG.info("Configuring Velocity ToolManager with {}", toolBoxLocation);
+ toolboxManager = new ToolManager();
+ toolboxManager.configure(toolBoxLocation);
} else {
- Velocity.info("VelocityViewServlet: No toolbox entry in configuration.");
+ LOG.info("Skipping TooManager initialisation, {} was not defined", StrutsConstants.STRUTS_VELOCITY_TOOLBOXLOCATION);
}
}
@@ -411,7 +405,6 @@
* </ul>
*
* @param context the current ServletContext. may <b>not</b> be null
- *
* @return the new velocity engine
*/
protected VelocityEngine newVelocityEngine(ServletContext context) {
@@ -428,7 +421,7 @@
// Set the velocity attribute for the servlet context
// if this is not set the webapp loader WILL NOT WORK
velocityEngine.setApplicationAttribute(ServletContext.class.getName(),
- context);
+ context);
try {
velocityEngine.init(p);
@@ -447,21 +440,18 @@
* <li>we need to define the various Struts custom user directives such as #param, #tag, and #bodytag</li>
* </ul>
*
- * @param context the servlet context
+ * @param context the servlet context
* @param properties velocity properties
*/
private void applyDefaultConfiguration(ServletContext context, Properties properties) {
// ensure that caching isn't overly aggressive
- /**
- * Load a default resource loader definition if there isn't one present.
- * Ben Hall (22/08/2003)
- */
+ LOG.debug("Load a default resource loader definition if there isn't one present.");
if (properties.getProperty(Velocity.RESOURCE_LOADER) == null) {
properties.setProperty(Velocity.RESOURCE_LOADER, "strutsfile, strutsclass");
}
- /**
+ /*
* If there's a "real" path add it for the strutsfile resource loader.
* If there's no real path and they haven't configured a loader then we change
* resource loader property to just use the strutsclass loader
@@ -487,11 +477,10 @@
properties.setProperty(Velocity.RESOURCE_LOADER, prop);
}
- /**
+ /*
* Refactored the Velocity templates for the Struts taglib into the classpath from the web path. This will
* enable Struts projects to have access to the templates by simply including the Struts jar file.
* Unfortunately, there does not appear to be a macro for the class loader keywords
- * Matt Ho - Mon Mar 17 00:21:46 PST 2003
*/
properties.setProperty("strutsclass.resource.loader.description", "Velocity Classpath Resource Loader");
properties.setProperty("strutsclass.resource.loader.class", "org.apache.struts2.views.velocity.StrutsResourceLoader");
@@ -502,8 +491,8 @@
StringBuilder sb = new StringBuilder();
for (TagLibraryDirectiveProvider tagLibrary : tagLibraries) {
- List<Class> directives = tagLibrary.getDirectiveClasses();
- for (Class directive : directives) {
+ List<Class<?>> directives = tagLibrary.getDirectiveClasses();
+ for (Class<?> directive : directives) {
addDirective(sb, directive);
}
}
@@ -520,11 +509,11 @@
properties.setProperty("userdirective", userdirective);
}
- private void addDirective(StringBuilder sb, Class clazz) {
+ private void addDirective(StringBuilder sb, Class<?> clazz) {
sb.append(clazz.getName()).append(",");
}
- private static final String replace(String string, String oldString, String newString) {
+ private static String replace(String string, String oldString, String newString) {
if (string == null) {
return null;
}
diff --git a/core/src/main/java/org/apache/struts2/util/VelocityStrutsUtil.java b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityStrutsUtil.java
similarity index 95%
rename from core/src/main/java/org/apache/struts2/util/VelocityStrutsUtil.java
rename to plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityStrutsUtil.java
index 9d53964..8536692 100644
--- a/core/src/main/java/org/apache/struts2/util/VelocityStrutsUtil.java
+++ b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityStrutsUtil.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.struts2.util;
+package org.apache.struts2.views.velocity;
import java.io.CharArrayWriter;
import java.io.IOException;
@@ -24,6 +24,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.struts2.util.StrutsUtil;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.context.Context;
import org.apache.velocity.exception.MethodInvocationException;
diff --git a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityTagLibrary.java b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityTagLibrary.java
index 6135164..f4d37d0 100644
--- a/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityTagLibrary.java
+++ b/plugins/velocity/src/main/java/org/apache/struts2/views/velocity/VelocityTagLibrary.java
@@ -61,8 +61,8 @@
public class VelocityTagLibrary implements TagLibraryDirectiveProvider {
@Override
- public List<Class> getDirectiveClasses() {
- Class[] directives = new Class[] {
+ public List<Class<?>> getDirectiveClasses() {
+ Class<?>[] directives = new Class[] {
ActionDirective.class,
BeanDirective.class,
CheckBoxDirective.class,
@@ -106,7 +106,7 @@
* @deprecated please use {#getDirectiveClasses}
*/
@Deprecated()
- public List<Class> getVelocityDirectiveClasses() {
+ public List<Class<?>> getVelocityDirectiveClasses() {
return getDirectiveClasses();
}
diff --git a/pom.xml b/pom.xml
index 8b42a17..3500e00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -734,28 +734,20 @@
<!-- Velocity -->
<dependency>
<groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.7</version>
+ <artifactId>velocity-engine-core</artifactId>
+ <version>2.1</version>
</dependency>
<dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity-tools</artifactId>
- <version>2.0</version>
- <exclusions>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>struts</groupId>
- <artifactId>struts</artifactId>
- </exclusion>
- <exclusion>
- <groupId>velocity</groupId>
- <artifactId>velocity</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>org.apache.velocity.tools</groupId>
+ <artifactId>velocity-tools-view</artifactId>
+ <version>3.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.velocity.tools</groupId>
+ <artifactId>velocity-tools-view-jsp</artifactId>
+ <version>3.0</version>
</dependency>
<dependency>