Click here to Skip to main content
15,880,956 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I guys, I'm working on a simple Spring Java application.
Sometimes (randomly) I republish to the server but when I run it on the server the changes weren't made. Can you help me? I've turned off the autodeploy. I'm using Spring Tool Suit with Tomcat 8.5.
Thank you guys

EDIT:
Turns out that tomcat is deploying correctly (I think) but when opens the page he loads the page on cache. If I refresh, changes are made. Anyone knows how to prevent this?

What I have tried:

Searched google but there's not much information on this.
Posted
Updated 19-Sep-17 22:19pm
v2
Comments
wseng 19-Sep-17 2:31am    
Better clean before run the project
Francisco Duarte DEV 19-Sep-17 5:20am    
I tried. And I noticed one thing. I have a button on my page that is doing nothing, and when I press it the page refresh and changes are made. I think this is very awkward.
Francisco Duarte DEV 19-Sep-17 9:01am    
I found out that it was deploying but when I run the server it automatically loads the page on cache I think. Anyone knows how to prevent this? thankyou

1 solution

Tomcat is deploying but browser is opening the cached page. Just refresh the page and changes are made.

I'm working with thymeleaf. If you wan't to make it permanent use the following code on your xml config:

<bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
    <property name="cacheable" value="false" />
</bean>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900