Skip to content

Commit

Permalink
Document MVEL limitation regarding inclusions (#2547)
Browse files Browse the repository at this point in the history
You may include a template file into an MVEL template using `@include{}`, as long as the templates reside on the filesystem.

Template inclusion doesn't work if the templates are loaded from the classpath using the Vert.x file resolver.

This is a limitation of the MVEL engine: some other engines let Vert.x plug in a custom template file resolver, MVEL doesn't.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
  • Loading branch information
tsegismont committed Dec 22, 2023
1 parent 4dfd2a9 commit 17a04c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vertx-web/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,15 @@ The variable 'foo' from the session is @{context.session().get('foo')}
The value 'bar' from the context data is @{context.get('bar')}
----

[NOTE]
====
You may include a template file into an MVEL template using `@include{}`, as long as the templates reside on the filesystem.
Template inclusion doesn't work if the templates are loaded from the classpath using the Vert.x file resolver.
This is a limitation of the MVEL engine: some other engines let Vert.x plug in a custom template file resolver, MVEL doesn't.
====

Please consult the http://mvel.documentnode.com/#mvel-2.0-templating-guide[MVEL templates documentation] for how to write
MVEL templates.

Expand Down

0 comments on commit 17a04c0

Please sign in to comment.