STS and HTML hot deploy

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

STS and HTML hot deploy

Reza
I have problem with STS and html template hot deploy.
Whenever I change an HTML file, I have to restart by container (e.g. tc Server or Tomcat) in order to see the changes!
Reply | Threaded
Open this post in threaded view
|

Re: STS and HTML hot deploy

danielfernandez
Administrator
Hi,

You probably have your template cache enabled (it is by default). Simply use the "cacheable" property of your Template Resolvers to disable it and your templates will be refreshed every time Thymeleaf loads them.

Regards,
Daniel.
Reply | Threaded
Open this post in threaded view
|

Re: STS and HTML hot deploy

Albertini
Hi, i was passing by looking for answer. Look, i have the same problem although im not pretty sure it's related with templates. The thing is that everything work just fine with sts and tc-server, is just that it doesn't refresh my page after i change it and sts do deploy. If the right answer is the same, please would you tell me where is this "cacheable" property. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: STS and HTML hot deploy

Zemi
Administrator
It is a property of TemplateResolver object:

    <bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
        <property name="cacheable" value="false" />
        <property name="templateMode" value="HTML5" />
        <property name="characterEncoding" value="UTF-8" />
    </bean>
Reply | Threaded
Open this post in threaded view
|

Re: STS and HTML hot deploy

Albertini
Right, as i thought, my problem is a little bit different, not related with templates, thanks anyway. The thing is that i'm currently working in a roo project (Spring Roo), with maven and tc-server in sts. I don't have any problems deploying a war file in tc-server (neither in Tomcat). My problem begin when i try to modify anything, like a html tag, and sts redeploys, but when I refresh my browser, it doesn't reflect the chage, so i have to reset my server to see it. At first glance it may look like a maven integration problem or something alike, but when i open the webapp, and open the modified file with another editor (like Notepad++), it is change!. So am really confused, I do not see what else is between the deployed file and what is actually showing the browser. Some thoughts??. Thanks again.