You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Helge-Frank Zimpel <po...@helge-zimpel.de> on 2015/12/04 18:06:12 UTC

org.apache.sling.scripting.thymeleaf (0.1.7-SNAPSHOT)

Hello,

I’ve configured Scripting Thymelead 0.1.7 snapshot as follows:

- Extension ‚html‘ for the Script Engine Factory
- '/apps/foo/bar/*.html‘ as pattern for template mode HTML

When calling my page (/imprint.html), i just get a page with the template path as content (fallback to StringTemplateResolver).

As you can see in the log, the HTML template resolver appears not to be configured

04.12.2015 17:44:02.193 *INFO* [qtp934934504-72] org.apache.sling.scripting.thymeleaf Service [org.apache.sling.scripting.thymeleaf.internal.ThymeleafScriptEngineFactory,461, [javax.script.ScriptEngineFactory]] ServiceEvent REGISTERED
04.12.2015 17:44:02.196 *INFO* [qtp934934504-72] org.apache.sling.scripting.thymeleaf Service [org.apache.sling.scripting.thymeleaf.internal.ResourceBundleMessageResolver,460, [org.thymeleaf.messageresolver.IMessageResolver]] ServiceEvent REGISTERED
04.12.2015 17:44:04.801 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF] INITIALIZING TEMPLATE ENGINE
04.12.2015 17:44:04.814 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine.CONFIG Initializing Thymeleaf Template engine configuration...
[THYMELEAF] TEMPLATE ENGINE CONFIGURATION:
[THYMELEAF] * Cache Manager implementation: org.thymeleaf.cache.StandardCacheManager
[THYMELEAF] * Template resolvers:
[THYMELEAF]     * org.thymeleaf.templateresolver.StringTemplateResolver
[THYMELEAF] * Message resolvers:
[THYMELEAF]     * org.thymeleaf.messageresolver.StandardMessageResolver
[THYMELEAF] * Dialect: Standard (org.thymeleaf.standard.StandardDialect)
[THYMELEAF]     * Prefix: "th"
[THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
04.12.2015 17:44:04.814 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF] TEMPLATE ENGINE INITIALIZED

What is wrong or missing here?

Thanks in advance!

Helge


Re: org.apache.sling.scripting.thymeleaf (0.1.7-SNAPSHOT)

Posted by Helge-Frank Zimpel <po...@helge-zimpel.de>.
> Am 07.12.2015 um 13:37 schrieb Oliver Lietz <ap...@oliverlietz.de>:
> 
> On Friday 04 December 2015 18:06:12 Helge-Frank Zimpel wrote:
>> Hello,
>> 
>> I’ve configured Scripting Thymelead 0.1.7 snapshot as follows:
>> 
>> - Extension ‚html‘ for the Script Engine Factory
>> - '/apps/foo/bar/*.html‘ as pattern for template mode HTML
>> 
>> When calling my page (/imprint.html), i just get a page with the template
>> path as content (fallback to StringTemplateResolver).
>> 
>> As you can see in the log, the HTML template resolver appears not to be
>> configured
>> 
>> 04.12.2015 17:44:02.193 *INFO* [qtp934934504-72]
>> org.apache.sling.scripting.thymeleaf Service
>> [org.apache.sling.scripting.thymeleaf.internal.ThymeleafScriptEngineFactory
>> ,461, [javax.script.ScriptEngineFactory]] ServiceEvent REGISTERED 04.12.2015
>> 17:44:02.196 *INFO* [qtp934934504-72] org.apache.sling.scripting.thymeleaf
>> Service
>> [org.apache.sling.scripting.thymeleaf.internal.ResourceBundleMessageResolve
>> r,460, [org.thymeleaf.messageresolver.IMessageResolver]] ServiceEvent
>> REGISTERED 04.12.2015 17:44:04.801 *INFO* [0:0:0:0:0:0:0:1 [1449247444798]
>> GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF]
>> INITIALIZING TEMPLATE ENGINE 04.12.2015 17:44:04.814 *INFO*
>> [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1]
>> org.thymeleaf.TemplateEngine.CONFIG Initializing Thymeleaf Template engine
>> configuration... [THYMELEAF] TEMPLATE ENGINE CONFIGURATION:
>> [THYMELEAF] * Cache Manager implementation:
>> org.thymeleaf.cache.StandardCacheManager [THYMELEAF] * Template resolvers:
>> [THYMELEAF]     * org.thymeleaf.templateresolver.StringTemplateResolver
>> [THYMELEAF] * Message resolvers:
>> [THYMELEAF]     * org.thymeleaf.messageresolver.StandardMessageResolver
>> [THYMELEAF] * Dialect: Standard (org.thymeleaf.standard.StandardDialect)
>> [THYMELEAF]     * Prefix: "th"
>> [THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
>> 04.12.2015 17:44:04.814 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET
>> /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF] TEMPLATE
>> ENGINE INITIALIZED
>> 
>> What is wrong or missing here?
> 
> This was a bug in NonCachingTemplateResolver (line 140, fixed in r1718329).
> 
> https://svn.apache.org/viewvc?view=revision&revision=r1718329
> 
> Regards,
> O.

Thank you for fixing the issue!

Regards,
Helge

> 
>> Thanks in advance!
>> 
>> Helge
> 


Re: org.apache.sling.scripting.thymeleaf (0.1.7-SNAPSHOT)

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Friday 04 December 2015 18:06:12 Helge-Frank Zimpel wrote:
> Hello,
> 
> I’ve configured Scripting Thymelead 0.1.7 snapshot as follows:
> 
> - Extension ‚html‘ for the Script Engine Factory
> - '/apps/foo/bar/*.html‘ as pattern for template mode HTML
> 
> When calling my page (/imprint.html), i just get a page with the template
> path as content (fallback to StringTemplateResolver).
> 
> As you can see in the log, the HTML template resolver appears not to be
> configured
> 
> 04.12.2015 17:44:02.193 *INFO* [qtp934934504-72]
> org.apache.sling.scripting.thymeleaf Service
> [org.apache.sling.scripting.thymeleaf.internal.ThymeleafScriptEngineFactory
> ,461, [javax.script.ScriptEngineFactory]] ServiceEvent REGISTERED 04.12.2015
> 17:44:02.196 *INFO* [qtp934934504-72] org.apache.sling.scripting.thymeleaf
> Service
> [org.apache.sling.scripting.thymeleaf.internal.ResourceBundleMessageResolve
> r,460, [org.thymeleaf.messageresolver.IMessageResolver]] ServiceEvent
> REGISTERED 04.12.2015 17:44:04.801 *INFO* [0:0:0:0:0:0:0:1 [1449247444798]
> GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF]
> INITIALIZING TEMPLATE ENGINE 04.12.2015 17:44:04.814 *INFO*
> [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1]
> org.thymeleaf.TemplateEngine.CONFIG Initializing Thymeleaf Template engine
> configuration... [THYMELEAF] TEMPLATE ENGINE CONFIGURATION:
> [THYMELEAF] * Cache Manager implementation:
> org.thymeleaf.cache.StandardCacheManager [THYMELEAF] * Template resolvers:
> [THYMELEAF]     * org.thymeleaf.templateresolver.StringTemplateResolver
> [THYMELEAF] * Message resolvers:
> [THYMELEAF]     * org.thymeleaf.messageresolver.StandardMessageResolver
> [THYMELEAF] * Dialect: Standard (org.thymeleaf.standard.StandardDialect)
> [THYMELEAF]     * Prefix: "th"
> [THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
> 04.12.2015 17:44:04.814 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET
> /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF] TEMPLATE
> ENGINE INITIALIZED
> 
> What is wrong or missing here?

This was a bug in NonCachingTemplateResolver (line 140, fixed in r1718329).

https://svn.apache.org/viewvc?view=revision&revision=r1718329

Regards,
O.

> Thanks in advance!
> 
> Helge


Re: org.apache.sling.scripting.thymeleaf (0.1.7-SNAPSHOT)

Posted by Helge-Frank Zimpel <po...@helge-zimpel.de>.
> Am 04.12.2015 um 18:34 schrieb Oliver Lietz <ap...@oliverlietz.de>:
> 
> On Friday 04 December 2015 18:06:12 Helge-Frank Zimpel wrote:
>> Hello,
> 
> Hello Helge,
> 
>> I’ve configured Scripting Thymelead 0.1.7 snapshot as follows:
>> 
>> - Extension ‚html‘ for the Script Engine Factory
>> - '/apps/foo/bar/*.html‘ as pattern for template mode HTML
>> 
>> When calling my page (/imprint.html), i just get a page with the template
>> path as content (fallback to StringTemplateResolver).
>> 
>> As you can see in the log, the HTML template resolver appears not to be
>> configured
>> 
>> 04.12.2015 17:44:02.193 *INFO* [qtp934934504-72]
>> org.apache.sling.scripting.thymeleaf Service
>> [org.apache.sling.scripting.thymeleaf.internal.ThymeleafScriptEngineFactory
>> ,461, [javax.script.ScriptEngineFactory]] ServiceEvent REGISTERED 04.12.2015
>> 17:44:02.196 *INFO* [qtp934934504-72] org.apache.sling.scripting.thymeleaf
>> Service
>> [org.apache.sling.scripting.thymeleaf.internal.ResourceBundleMessageResolve
>> r,460, [org.thymeleaf.messageresolver.IMessageResolver]] ServiceEvent
>> REGISTERED 04.12.2015 17:44:04.801 *INFO* [0:0:0:0:0:0:0:1 [1449247444798]
>> GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF]
>> INITIALIZING TEMPLATE ENGINE 04.12.2015 17:44:04.814 *INFO*
>> [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1]
>> org.thymeleaf.TemplateEngine.CONFIG Initializing Thymeleaf Template engine
>> configuration... [THYMELEAF] TEMPLATE ENGINE CONFIGURATION:
>> [THYMELEAF] * Cache Manager implementation:
>> org.thymeleaf.cache.StandardCacheManager [THYMELEAF] * Template resolvers:
>> [THYMELEAF]     * org.thymeleaf.templateresolver.StringTemplateResolver
>> [THYMELEAF] * Message resolvers:
>> [THYMELEAF]     * org.thymeleaf.messageresolver.StandardMessageResolver
>> [THYMELEAF] * Dialect: Standard (org.thymeleaf.standard.StandardDialect)
>> [THYMELEAF]     * Prefix: "th"
>> [THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
>> 04.12.2015 17:44:04.814 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET
>> /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF] TEMPLATE
>> ENGINE INITIALIZED
>> 
>> What is wrong or missing here?
> 
> the NonCachingTemplateResolver is missing. Did you start with a fresh 
> configuration for 0.1.x (Thymeleaf 3) or are you using one for 0.0.6 
> (Thymeleaf 2.1)?

It was a fresh testing installation with Launchpad 8. I’ve installed the dependencies (javassist, all other required bundles are part of Launchpad 8) and Scripting Thymeleaf 0.1.7 snapshot (from december 3rd) and the bundle with my application.
I’ve removed the Sighty scripting engine bundles (because it also uses html as extension).
Afterwards I’ve configured the Script Engine Factory (extension html) and the pattern expressions for the NonCachingTemplateResolver (as written above).

> 
> Regards,
> O.
> 
>> Thanks in advance!
>> 
>> Helge
> 


Re: org.apache.sling.scripting.thymeleaf (0.1.7-SNAPSHOT)

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Friday 04 December 2015 18:06:12 Helge-Frank Zimpel wrote:
> Hello,

Hello Helge,

> I’ve configured Scripting Thymelead 0.1.7 snapshot as follows:
> 
> - Extension ‚html‘ for the Script Engine Factory
> - '/apps/foo/bar/*.html‘ as pattern for template mode HTML
> 
> When calling my page (/imprint.html), i just get a page with the template
> path as content (fallback to StringTemplateResolver).
> 
> As you can see in the log, the HTML template resolver appears not to be
> configured
> 
> 04.12.2015 17:44:02.193 *INFO* [qtp934934504-72]
> org.apache.sling.scripting.thymeleaf Service
> [org.apache.sling.scripting.thymeleaf.internal.ThymeleafScriptEngineFactory
> ,461, [javax.script.ScriptEngineFactory]] ServiceEvent REGISTERED 04.12.2015
> 17:44:02.196 *INFO* [qtp934934504-72] org.apache.sling.scripting.thymeleaf
> Service
> [org.apache.sling.scripting.thymeleaf.internal.ResourceBundleMessageResolve
> r,460, [org.thymeleaf.messageresolver.IMessageResolver]] ServiceEvent
> REGISTERED 04.12.2015 17:44:04.801 *INFO* [0:0:0:0:0:0:0:1 [1449247444798]
> GET /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF]
> INITIALIZING TEMPLATE ENGINE 04.12.2015 17:44:04.814 *INFO*
> [0:0:0:0:0:0:0:1 [1449247444798] GET /imprint.html HTTP/1.1]
> org.thymeleaf.TemplateEngine.CONFIG Initializing Thymeleaf Template engine
> configuration... [THYMELEAF] TEMPLATE ENGINE CONFIGURATION:
> [THYMELEAF] * Cache Manager implementation:
> org.thymeleaf.cache.StandardCacheManager [THYMELEAF] * Template resolvers:
> [THYMELEAF]     * org.thymeleaf.templateresolver.StringTemplateResolver
> [THYMELEAF] * Message resolvers:
> [THYMELEAF]     * org.thymeleaf.messageresolver.StandardMessageResolver
> [THYMELEAF] * Dialect: Standard (org.thymeleaf.standard.StandardDialect)
> [THYMELEAF]     * Prefix: "th"
> [THYMELEAF] TEMPLATE ENGINE CONFIGURED OK
> 04.12.2015 17:44:04.814 *INFO* [0:0:0:0:0:0:0:1 [1449247444798] GET
> /imprint.html HTTP/1.1] org.thymeleaf.TemplateEngine [THYMELEAF] TEMPLATE
> ENGINE INITIALIZED
> 
> What is wrong or missing here?

the NonCachingTemplateResolver is missing. Did you start with a fresh 
configuration for 0.1.x (Thymeleaf 3) or are you using one for 0.0.6 
(Thymeleaf 2.1)?

Regards,
O.

> Thanks in advance!
> 
> Helge