is the "application" a reserved word in the EscapeTool?
-------------------------------------------------------
Key: VELTOOLS-151
URL: https://issues.apache.org/jira/browse/VELTOOLS-151
Project: Velocity Tools
Issue Type: Bug
Components: GenericTools
Affects Versions: 2.1
Reporter: jamee.wang
Recently, I use apache velocity for view template in spring framework, and in
order to escape the HTML entity, I introduced the
"org.apache.velocity.tools.generic.EscapeTool", however, then I found the
variable named with "$application" cannot work now, that any variable named
with "$application" shows blank, e.g. "$!application.name".
When I removed the velocity tool configuration, "$application" can be read
correctly. So anyone knows if the "$application" a reserved word in velocity
escape tool or I make a mistake when configuration?
Toolbox config:
<?xml version="1.0" encoding="UTF-8"?>
<toolbox>
<tool>
<key>esc</key>
<scope>application</scope>
<class>org.apache.velocity.tools.generic.EscapeTool</class>
</tool>
</toolbox>
Config in spring-beans XML:
<bean id="viewResolver"
class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
<property name="cache" value="true" />
<property name="exposeSpringMacroHelpers" value="true" />
<property name="toolboxConfigLocation" value="/WEB-INF/toolbox.xml" />
</bean>
In template file:
<div class="description">
<h2>Application Nameļ¼$!application.name</h2>
</div>
Thanks in advance!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]