Page 1 of 1

template resolver

Posted: Thu May 08, 2014 9:22 pm
by nanix84

Code: Select all

<bean id="blAdminWebTemplateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
        <property name="prefix" value="/WEB-INF/templates/admin/" />
        <property name="suffix" value=".html" />
        <property name="templateMode" value="HTML5" />
        <property name="cacheable" value="${cache.page.templates}"/>
        <property name="cacheTTLMs" value="${cache.page.templates.ttl}" />
        <property name="characterEncoding" value="UTF-8" />
        <property name="order" value="200"/>         
    </bean>

Im not sure where to put my admin html templates. I already added my html template under admin project WEB-INF/templates/admin/mysite/myTemplate.html

but when i try to use it on the controller return statement, it throws an error:
Error resolving template "mysite/myTemplate", template might not exist or might not be accessible by any of the configured Template Resolvers

Re: template resolver

Posted: Fri May 09, 2014 12:14 pm
by phillipuniverse
That definitely looks right to me. Maybe you didn't rebuild the war?

Re: template resolver

Posted: Tue May 13, 2014 2:19 am
by nanix84
I have already rebuild it but still wont work. What I do is to have a separate folder instead in the resources and added a resolver that points to it