Releases: casid/jte
1.11.3
1.11.2
- #92 DirectoryCodeResolver follows symlinks
- #105 Show calling template and line number in compile error for non-existing tag parameters
- #95 Add debug template line information for parameters used in renderMap()
- #94 Provide better exception message if template engine is initialized with ContentType.Plain instead of ContentType.Html
- #93 jte-kotlin: bump Kotlin version to 1.5.20
- #111 Resolve conflict with alpine.js syntax in OWASP policy, improve the quality of PreventOutputInTagsAndAttributes error messages
- Ensure instanceof pattern matching works with Java 14+
- gradle-plugin: Bump gradle version to 7.1.1 for Java 16 support
jsp-converter
- #96 Fix import of array types in converted JSP tags
- #96 Fix import of generic types in converted JSP tags
- #101 Fix conversion of string concatenation in JSP EL expression
- #102 Support conversion of JSP files containing AstListData
- #103 JSP bridging tags with body are closed correctly when replacing usages after conversion
- #106 String AST nodes stay properly escaped when converting JSP to jte
- #108 Improve JSP comment and control expression collapse during conversion
- #104 Parameters of converted JSP tags are put on seperate lines
1.11.1
1.11.0
1.10.0
Features
- #72 GraalVM native-image support, more details and how to use here. Kudos to @edward3h for this contribution!
- #81 A new jte extension for the Gradle plugin removes lots of boilerplate. Make sure to have a look at the updated examples. Big thanks to @edward3h for contributing this extension!
Fixes
1.9.0
- #67
DirectoryCodeResolver
no longer does file watching. This removes a problematiccom.sun.nio
dependency and was likely not used by 99% of jte users. In case you need the file watching on your project, please add thejte-watcher
dependency as described here. - #61 You may now configure the class path used by the compiler via
TemplateEngine::setClassPath
- #65 modification times are only stored for existing files in DirectoryCodeResolver
- Empty values for localization keys now result in null Content, since it makes no sense to render them.
- #68 fixed Gradle path setup in examples
1.8.0
This release adds the optional jte-kotlin
module.
It can compile .kte
template files, which use Kotlin instead of Java as expression language. See #57 for more background information.
This is how the example.jte
file from the front page looks like as example.kte
:
@import org.example.Page
@param page:Page
<head>
@if(page.description != null)
<meta name="description" content="${page.description}">
@endif
<title>${page.title}</title>
</head>
<body>
<h1>${page.title}</h1>
<p>Welcome to my example page!</p>
</body>
To compile templates with Kotlin as expression language, you need to add the jte-kotlin
module to your project:
<dependency>
<groupId>gg.jte</groupId>
<artifactId>jte-kotlin</artifactId>
<version>1.8.0</version>
</dependency>
Since 1.8.0 both Maven and Gradle plugins can precompile jte and kte files. You can seamlessly call jte templates from kte templates and vice versa. This might be handy if you'd like to migrate the expression language of existing jte templates from Java to Kotlin.
The IntelliJ plugin is pretty far already to support kte files (https://github.com/casid/jte-intellij/tree/kotlin-support). There's still one issue with unresolved backwards references. If anyone has an idea why this doesn't work with Kotlin injections (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008349720-Kotlin-references-in-MultiHostInjector-are-not-working-correctly), I'm very happy about any hint :-) Regardless there's gonna be a first beta release of the IntelliJ plugin with Kotlin support next week!
Other bugfixes and improvements:
1.7.0
- Binary templates for maximum rendering throughput
- Gradle Plugin to precompile/generate templates (thanks @iRebbok for contributing!)
- #52 Add hasTemplate method to TemplateEngine
- #51 generate/precompile returns list of generated/precompiled java files.