Questions tagged [apache-velocity]

Apache Velocity is a Java-based template engine. It can be used to dynamically generate web pages, email messages, source code, or any other text file.

Apache Velocity is a Java-based template engine. It permits anyone to use a simple yet powerful template language to reference objects defined in Java code.

Velocity can be used to dynamically generate web pages, email messages, source code, or any other text file.

Apache Velocity is a project of the Apache Software Foundations (ASF).

It include 2 releases of Engine and Tools:

Latest Engine 2.0 released in 2017-08-06

Latest Tools 2.0 released in 2010-05-10

Site http://velocity.apache.org/

74 questions
1
vote
0 answers

Apache Velocity not rendering CSS transform tag

I am trying to rotate the obtained image using CSS. I have checked the same using plain vanilla HTML CSS and the image is indeed being rotated. Below is my code for the same : CSS : .transform-right{ transform : rotate(90deg); } HTML :
Vishal A
  • 144
  • 3
  • 17
1
vote
1 answer

apache velocity to ignore \n in token?

Is there a way to tell apache velocity to ignore \n in tokens? For the following password token (line number 2) The output is on line number 6 and 7 update someone marked this as Duplicate, its not, in my case the new line are in the token
JavaSheriff
  • 7,074
  • 20
  • 89
  • 159
1
vote
1 answer

Polarion ALM SDK API getWorkItem()

I have a question about the Polarion SDK API I am in a Project -> Documents and Pages -> Testing. From there I created a new wiki article. In the editing of the article I did the following: 1) created a sql query using: #set ($sql_result =…
adbarads
  • 1,253
  • 2
  • 20
  • 43
1
vote
2 answers

Velocity with double curly braces

Why velocity gives the following output for the string VelocityContext vc = new VelocityContext(); vc.put("foo", "bar"); String inString = "THis is ${{foo}} and this is ${foo}.Hello and ${foo}-Hello"; StringWriter sw = new…
vinod ep
  • 51
  • 1
  • 7
1
vote
2 answers

Passing javascript variable to velocity variable templete

I have installed xwiki successfully and able to generate wiki pages using velocity template language. Could anyone please tell me that how can I pass javascript varible to velocity templete. I have gone through few forums that I need to pass the…
charan098
  • 11
  • 1
  • 4
1
vote
1 answer

Importing Apache Velocity in IntelliJ Idea

I am using the IntelliJ IDEA on a mac and want to import Apache Velocity. In my pom.xml file:
Rgfvfk Iff
  • 1,549
  • 2
  • 23
  • 47
1
vote
1 answer

Spark + Velocity: Unable to load resources (ResourceNotFoundException)

I'm currently using Spark and trying to use templates via Velocity based on the documentation. I'm however having some errors, could anyone provide guidance on how I can successfully load the templates? Aug 22, 2017 2:26:43 PM…
Seth Falco
  • 313
  • 6
  • 22
1
vote
1 answer

Apache Velocity 2.0 Scripting Compilable not working

I'm trying to check velocity scripting engine 2.0 which Provide JSR 223 implementation and support of Compilable the Compilable interface has been implemented in the process. I use jars: velocity-engine-scripting-2.0.jar, velocity-1.7.jar,…
Ori Marko
  • 56,308
  • 23
  • 131
  • 233
1
vote
3 answers

Velocity Template not able to parse and display data in html format

I have a simple email program written in Java and Spring with Velocity template to format data that sends email which should be displayed in html format. However, it just displays the data along with the html tags embedded in it without actually…
Nital
  • 5,784
  • 26
  • 103
  • 195
1
vote
3 answers

org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'templates/email/test.vm'

My code as follow. VelocityEngine ve = new VelocityEngine(); ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "class"); ve.setProperty("class.resource.loader.class",…
isurujay
  • 1,386
  • 10
  • 15
0
votes
0 answers

How to use JavaScript function in Apache velocity?

I have a pre-built JavaScript function that I want to call in velocity template. I am not very well aware with the velocity and its syntax. I want to use JavaScript function of external script inside my current velocity template. I've already added…
rsharma
  • 45
  • 9
0
votes
1 answer

AppSync VTL resolver - how to resolve parse error

I'm getting this error on my VTL response mapping and I'm not sure what it means graphql: Encountered "}" at velocity[line 9, column 3] Was expecting one of: "[" ... …
jordan
  • 9,570
  • 9
  • 43
  • 78
0
votes
0 answers

Why does my Velocity Template conditional assignment not work properly?

I am trying to create custom Getters using Velocity Template that are annotated with a @Generated annotation. My current template looks like this: #if($field.recordComponent) @Generated public ${field.type} ${field.name}() { return…
MrMyth
  • 67
  • 6
0
votes
1 answer

Apache Velocity: Verify if all variables in a context are present in velocity template

Is it possible in Apache Velocity 1.7 to check if all keys specified in a VelocityContext are valid for a template? For example, let's say I have a template, card.vm, that looks like this: card { type: CREDIT company: VISA name:…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
0 answers

Disable velocity.log with Apache velocity v2.0

I have recently migrated to Apache velocity v2.0 from 1.7. I am calling my Java code from AWS Lambda function and hence I want to disable any velocity.log file that is created. In previous version we were…
sraipuria
  • 11
  • 2