<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Local deploy of theme requires Tomcat restart</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114336914" />
  <subtitle>Local deploy of theme requires Tomcat restart</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114336914</id>
  <updated>2026-04-06T09:19:26Z</updated>
  <dc:date>2026-04-06T09:19:26Z</dc:date>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120613673" />
    <author>
      <name>Marco Endres</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120613673</id>
    <updated>2021-02-15T08:12:40Z</updated>
    <published>2021-02-15T08:12:40Z</published>
    <summary type="html">&lt;p&gt;Maybe it helps somebody :)&lt;/p&gt;
&lt;p&gt;https://github.com/liferay/liferay-frontend-projects/issues/402&lt;/p&gt;</summary>
    <dc:creator>Marco Endres</dc:creator>
    <dc:date>2021-02-15T08:12:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119500621" />
    <author>
      <name>Milan Riha</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119500621</id>
    <updated>2020-06-28T20:13:16Z</updated>
    <published>2020-06-28T20:13:16Z</published>
    <summary type="html">Hi,what work for me in LR 7.3 is change theme version in package.json and make any change directly in main.scss file, even if not needed. For example when I change only imported file.</summary>
    <dc:creator>Milan Riha</dc:creator>
    <dc:date>2020-06-28T20:13:16Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119495424" />
    <author>
      <name>Marco Endres</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119495424</id>
    <updated>2020-06-26T11:31:18Z</updated>
    <published>2020-06-26T11:31:18Z</published>
    <summary type="html">Do you also had the problems on test or prod-environments? Where you only deploy the .war?</summary>
    <dc:creator>Marco Endres</dc:creator>
    <dc:date>2020-06-26T11:31:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119495049" />
    <author>
      <name>Jeff Hellman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119495049</id>
    <updated>2020-06-26T10:30:10Z</updated>
    <published>2020-06-26T10:30:10Z</published>
    <summary type="html">Honestly, I just got in the habit of running `gulp deploy:clean-cache` instead of the regular `gulp deploy` and figured I never cared whether the cache was still there &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;</summary>
    <dc:creator>Jeff Hellman</dc:creator>
    <dc:date>2020-06-26T10:30:10Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119494738" />
    <author>
      <name>Marco Endres</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119494738</id>
    <updated>2020-06-26T10:15:48Z</updated>
    <published>2020-06-26T10:15:48Z</published>
    <summary type="html">Thank you very much. This could be really useful next time &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;</summary>
    <dc:creator>Marco Endres</dc:creator>
    <dc:date>2020-06-26T10:15:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119494427" />
    <author>
      <name>Jeff Hellman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119494427</id>
    <updated>2020-06-26T10:07:58Z</updated>
    <published>2020-06-26T10:07:58Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I ended up doing it by hand in an automated and slightly brittle fashion. I created a gulp task in my theme project and bound it to the deploy task from the existing&amp;nbsp;liferay-theme-tasks&amp;nbsp;&amp;nbsp;- - code is as follows. You'll need to update your path accordingly, and this is the brittle piece since any changes to folder structure and this breaks.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
var&amp;amp;nbsp;cachePath&amp;amp;nbsp;=&amp;amp;nbsp;'C:/&amp;lt;path to your tomcat instance&amp;gt;/tomcat-9.0.17/work/Catalina/localhost/ROOT/css/';
var&amp;amp;nbsp;cacheFilePattern&amp;amp;nbsp;=&amp;amp;nbsp;"*liferay-federated-client-portal-theme*";

gulp.task('deploy:clean-cache',&amp;amp;nbsp;['deploy'],&amp;amp;nbsp;function&amp;amp;nbsp;()&amp;amp;nbsp;{
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;//&amp;amp;nbsp;force&amp;amp;nbsp;the&amp;amp;nbsp;delete&amp;amp;nbsp;since&amp;amp;nbsp;this&amp;amp;nbsp;is&amp;amp;nbsp;outside&amp;amp;nbsp;the&amp;amp;nbsp;working&amp;amp;nbsp;directory&amp;amp;nbsp;and&amp;amp;nbsp;below
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;del(cachePath&amp;amp;nbsp;+&amp;amp;nbsp;cacheFilePattern,&amp;amp;nbsp;{
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;force:&amp;amp;nbsp;true
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;});
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;log("Cached&amp;amp;nbsp;CSS&amp;amp;nbsp;has&amp;amp;nbsp;been&amp;amp;nbsp;deleted&amp;amp;nbsp;from:&amp;amp;nbsp;"&amp;amp;nbsp;+&amp;amp;nbsp;cachePath&amp;amp;nbsp;+&amp;amp;nbsp;cacheFilePattern);
});
&amp;lt;/path&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Jeff Hellman</dc:creator>
    <dc:date>2020-06-26T10:07:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119494069" />
    <author>
      <name>Marco Endres</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119494069</id>
    <updated>2020-06-26T09:55:07Z</updated>
    <published>2020-06-26T09:55:07Z</published>
    <summary type="html">I have sometimes the same problem. Did you find out more? Do yu know how I can clean those files without going to delete those files by hand?Marco</summary>
    <dc:creator>Marco Endres</dc:creator>
    <dc:date>2020-06-26T09:55:07Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114343540" />
    <author>
      <name>Jeff Hellman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114343540</id>
    <updated>2019-07-17T14:00:22Z</updated>
    <published>2019-07-17T14:00:22Z</published>
    <summary type="html">I am less baffled about the browser difference now, it looks like the requested URL does change with a browserId parameter, which in turn results in a new set of files in the Tomcat cache location:&lt;br /&gt;&lt;br /&gt;C:\Liferay\liferay-dxp-7.2.10-ga1\tomcat-9.0.17\work\Catalina\localhost\ROOT\css&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So now at least I understand why switching browsers works the first time, at which point point it will add the cache files and then subsequent requests with that browser get served those. So it&amp;#39;s still a matter of server caching at this point.</summary>
    <dc:creator>Jeff Hellman</dc:creator>
    <dc:date>2019-07-17T14:00:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114343249" />
    <author>
      <name>Jeff Hellman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114343249</id>
    <updated>2019-07-17T13:37:36Z</updated>
    <published>2019-07-17T13:37:36Z</published>
    <summary type="html">I added the portal-ext.properties to no effect unfortunately. The behavior is interesting, the following scenario plays out:&lt;ol style="list-style: decimal outside;" start="1"&gt;&lt;li&gt;Launch local Tomcat&lt;/li&gt;&lt;li&gt;Load page in Chrome - see page load as expected&lt;/li&gt;&lt;li&gt;Make a change to the theme and run &amp;#34;gulp deploy&amp;#34;&lt;/li&gt;&lt;li&gt;Confirm the .war is deployed to Tomcat and see the &amp;#34;STARTED&amp;#34; message from the Bundle Listener&lt;/li&gt;&lt;li&gt;Do a hard refresh/clear cache in Chrome, do not see the theme change&lt;/li&gt;&lt;li&gt;Load page in Edge - see page load WITH the theme change&lt;/li&gt;&lt;li&gt;Make another change to the theme and run &amp;#34;gulp deploy&amp;#34;&lt;/li&gt;&lt;li&gt;Confirm the .war is deployed to Tomcat (same as before)&lt;/li&gt;&lt;li&gt;Do a hard refresh/clear cache in Edge and Chrome, do not see the theme change in either browser&lt;/li&gt;&lt;li&gt;Load page in Internet Explorer 11 - see page load WITH the first and second theme changes&lt;/li&gt;&lt;li&gt;Do the same theme change/redeploy steps (#3 and #4) and see no change in Chrome/Edge/IE 11&lt;/li&gt;&lt;/ol&gt;So this baffles me because if it was a browser cache issue then loading the page after clearing the cache and restarting the browser would address that. If it was a server cache issue, then I would think the browsers would receive the same .css file served up from Tomcat.&lt;ul style="list-style: disc outside;"&gt;&lt;li&gt;Does Tomcat keep track of what browser it has served content up to and cache it specifically that way?&lt;/li&gt;&lt;li&gt;Is there something in the .css file URL or HTTP request headers that changes behavior on Tomcat for what it serves up?&lt;/li&gt;&lt;li&gt;Does using DXP instead of CE for the Liferay version make a different in the developer properties I tried?&lt;/li&gt;&lt;/ul&gt;</summary>
    <dc:creator>Jeff Hellman</dc:creator>
    <dc:date>2019-07-17T13:37:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114332111" />
    <author>
      <name>Patrick Yeo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114332111</id>
    <updated>2019-07-16T21:21:47Z</updated>
    <published>2019-07-16T21:21:47Z</published>
    <summary type="html">&lt;a href="https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/using-developer-mode-with-themes"&gt;https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/using-developer-mode-with-themes&lt;/a&gt;&lt;br /&gt;Put portal-ext.properties in the ...\liferay-dxp-7.2.10-ga1 directory and restart server. It should disable caching.</summary>
    <dc:creator>Patrick Yeo</dc:creator>
    <dc:date>2019-07-16T21:21:47Z</dc:date>
  </entry>
  <entry>
    <title>Local deploy of theme requires Tomcat restart</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114336913" />
    <author>
      <name>Jeff Hellman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114336913</id>
    <updated>2019-07-16T21:14:09Z</updated>
    <published>2019-07-16T21:14:09Z</published>
    <summary type="html">When doing local development of my theme, the &amp;#34;gulp deploy&amp;#34; task appears to successfully deploy my theme .war to the local Tomcat instance, and indeed I can immediately see changes I make to the Freemarker templates. However, the main.css delivered to the browser doesn&amp;#39;t have the most recent changes.&lt;br /&gt;&lt;br /&gt;I can see in the .war that is deployed that the main.css does have my changes. It would appear that Tomcat keeps a cached version of that main.css file in  the following location (for example):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;...\liferay-dxp-7.2.10-ga1\tomcat-9.0.17\work\Catalina\localhost\ROOT\css\http__o_theme-name_css_main.css....&lt;br /&gt;&lt;br /&gt;Is there a recommendation on how to clear that cache as part of the &amp;#34;gulp deploy&amp;#34;? I could do it manually but I&amp;#39;d prefer not to. I could also restart Tomcat each time I deploy but I want to do that even less than manually deleting the cache.</summary>
    <dc:creator>Jeff Hellman</dc:creator>
    <dc:date>2019-07-16T21:14:09Z</dc:date>
  </entry>
</feed>
