Closed albertorobles2000 closed 2 months ago
What kind of file are you trying to produce?
A raw file. In our case we have velocity integrated in a code generator that process an input file and generates code for the given file for a bunch of APIs C/C++/Java/Python/C#.
Is JTE not expected to be used when you want to generate files different from html?
JTE can be used for other types of files, but sometimes there are other ways of generating output that are more convenient.
For example, the "jte-models" extension in this project uses JTE to generate Java code, since it avoids needing another dependency. In a different project I am using JavaPoet to generate Java code, because it is better suited for the task.
Can only second @edward3h point. jte is heavily focused on generating HTML. For generating code I would (personally) definitely use a different library, like JavaPoet for Java Code.
Hi!
I'm starting to investigate JTE to try to migrate a velocity project. I have some complex conditions and I cannot do everything in just one line but I want the output rendered in one line. For example if for this:
I will get
l = [A B C E G J ... Z ]
I cannot put all those condtions in one line, but the output has to be all in one line. Is it implemented? In velocity I can do:And the output will be
l = [A B C E G J ... Z ]