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
0
votes
0 answers

Iterate a map with VTL velocity template. Camel

I have a Map of this type but I have not been able to print it in a velocity template. This is for a SOAP service {DATOS_CONTACTO=[{TIPO_DOCUMENTO=CC, NUMERO_DOCUMENTO=1525250, COD_DEPARTAMENTO=10, COD_MUNICIPIO=222, DIR_RESIDENCIA=CL 4A 3 52,…
0
votes
1 answer

How to create a Confluence user macro that divides the size of 2 Jira filters

What I tried was: ## Macro title: totalBugs ## Macro has a body: Y ## Body processing: Rendered ## Output: Rendered ## ## Developed by: Margus Martsepp ## Date created: 06/02/2023 ## Installed by: Margus Martsepp ## @param…
Margus
  • 19,694
  • 14
  • 55
  • 103
0
votes
0 answers

Can't split the page horizontally from html to pdf conversion with Apache velocity and itextpdf in Spring Boot,Java

I have a function to get data from the database and fill them into a prepared HTML template then export them to a pdf file. I'm using Apache Velocity vm file and itextpdf for that purpose. I need to do this on one page because users will print the…
0
votes
1 answer

Read JSON with special character in keys using apache velocity

I have a JSON which has an attribute with its List type. Can someone help me on how to read the value in Apache Velocity template? Following is an example of JSON. The challenge is to read the list of University from JSON and iterate through it. { …
James Stan
  • 51
  • 6
0
votes
0 answers

Can a single VTL resolver be attached to pipeline in a way to be executed before/after ANY of the AppSync's GraphQL request?

Developer can add VTL resolver to be executed before/after specific graphQL requests. Question is, is there a way to "slot" (attach) VTL resolver that would be executed with any graphQL request, not just specific one? Currently, I place…
0
votes
0 answers

Apache Velocity not able to fetch the values from data map sent using Jira Template Renderer

I have developed a Jira Plugin for Server in which I am sending the required data to the velocity template files from the Get Servlet using render method of Template Renderer…
0
votes
1 answer

Velocity Removing New Line (Apache Velocity 2.0)

Recently we migrated our application from Velocity 1.7 to 2.0. But after the migration. I see a strange problem, that the output is chomping new lines and merging lines. This happens when we do a parseTemplate() call. For Example, here is the piece…
hell_storm2004
  • 1,401
  • 2
  • 33
  • 66
0
votes
0 answers

How to covert number to words in velocity template?

I am using velocity template, I want to convert number to words, Is there any library present for that? eg: 99999999 = ninety-nine million nine hundred ninety-nine thousand nine hundred ninety-nine
0
votes
1 answer

How to set default value in Select dropdown in velocity template file?

I am trying to build a custom build Jira Plugin, on the UI of plugin I am displaying select dropdown which consist of list of Issue Types. I need to make option value "ALL" as default one for that select dropdown. I have written following code for…
0
votes
1 answer

Replace first and last occurrence of a string with another

Given a string "[ something that may contain a brace ], like so]". The start and end brackets need to be replaced with ( and ) or alternatively removed. I am really looking for the replacement and not the removal. Braces on the inside of the string…
0
votes
0 answers

URLResourceLoader with Username/Password

I am trying to setup a URLResouceLoader as a store for all the template files. But the URL is secured with a username and password. Is there any way to pass the username and password when I setup the VelocityEngine? My current code looks like: //…
hell_storm2004
  • 1,401
  • 2
  • 33
  • 66
0
votes
1 answer

How can I add a slash before a dollar sign in a PhpStorm template file?

I'm trying to create a file template for PhpStorm that has a back-slash in front of a variable. This is for a json template used in magento development, but I would say that this issue is extension ambivalent: Text in the…
AndrewRMillar
  • 608
  • 1
  • 7
  • 17
0
votes
1 answer

Veocity : How to find frequency of values in array and then sort the values in the order of frequency

I have any array in velocity which has duplicate values too. I want to create an array with unique values where all the values are sorted based on their count/frequency in the original array. For example: #set($y = 0) …
Kaps
  • 23
  • 7
0
votes
0 answers

Use Apache velocity 1.7 or 2.0 in Java application without Maven

Can someone detail the steps to use the Velocity templating engine in Java plugin project without using Maven for building and resolving dependencies. I would like to download the required plugins/dependencies manually and package them part of my…
Rookie
  • 33
  • 5
0
votes
1 answer

Removing brackets from velocity template (xml escaping)

I am new to velocity template. I am using velocity template to parse the data in xml format. Using below code to fetch userId: $esc.xml("$!userDetails.userId).replaceAll("&#[0-9a-fA-F]+;","") Generated output: [ABC123] Excepted output: ABC123 Can…