Foren

Avoiding tomcat restart

Joseph Bashir, geändert vor 15 Jahren.

Avoiding tomcat restart

New Member Beiträge: 7 Beitrittsdatum: 19.08.08 Neueste Beiträge
Whenever I change a .vm file in theme, I always have to restart tomcat to show the effect of modified .vm files. Is there any way how to avoid restart after every change.

I am using Liferay 5.1.1.

Thanks and regards.


Joseph Bashir
Matt King, geändert vor 15 Jahren.

RE: [Liferay Forums][3. Development] Avoiding tomcat restart

Junior Member Beiträge: 60 Beitrittsdatum: 10.07.08 Neueste Beiträge
Nope, you have to restart each time, as the velocity templates are compiled into memory



From: Joseph Bashir from liferay.com [mailto:no-reply@liferay.com]
Sent: Friday, November 14, 2008 2:14 AM
To: mb.239390.1582008@events.liferay.com
Subject: [Liferay Forums][3. Development] Avoiding tomcat restart <mb.239390.1582008@events.liferay.com>



Whenever I change a .vm file in theme, I always have to restart tomcat to show the effect of modified .vm files. Is there any way how to avoid restart after every change.

I am using Liferay 5.1.1.

Thanks and regards.


Joseph Bashir
--
Liferay Message Boards
http://www.liferay.com/web/guest/community/forums/message_boards/message/1582008
mb.239390.1582008@events.liferay.com
http://www.liferay.com
thumbnail
Alex Wallace, geändert vor 15 Jahren.

RE: Avoiding tomcat restart

Liferay Master Beiträge: 640 Beitrittsdatum: 05.11.07 Neueste Beiträge
In my experience, redeploying the theme war makes the changes be reflected on tomcat, w/o restart.

However, if you directly modified a vm file in tomcat, the redeploy won't cut it, you will need to remove the theme war from webapps and then redeploy for that...

Tomcat realizes you modified the file directly and gives it more importance than one being deployed, so removing the theme completly is required...

Hope this helps!
thumbnail
Dominik Lastname, geändert vor 13 Jahren.

RE: Avoiding tomcat restart

Junior Member Beiträge: 57 Beitrittsdatum: 10.11.08 Neueste Beiträge
As you maybe already know and to solve the thread, here is the solution for your problem (working in lr 523)



#
# Velocity Reloading (only for development)
#
    file.resource.loader.path = templates
    file.resource.loader.cache = false
    velocimacro.library.autoreload = true
thumbnail
Hitoshi Ozawa, geändert vor 13 Jahren.

RE: Avoiding tomcat restart

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
As you maybe already know and to solve the thread, here is the solution for your problem (working in lr 523)


Would appreciate if you can tell us where you've set these velocity.properties settings in Liferay. Following issues seems to say that it's still not supported.

http://issues.liferay.com/browse/LPS-3081
thumbnail
Vishal Mehta, geändert vor 13 Jahren.

RE: Avoiding tomcat restart

Junior Member Beiträge: 42 Beitrittsdatum: 08.03.11 Neueste Beiträge
I think Server Administration field in control panel allows you to clear cache. Doing that should solve the problem of restarting Tomcat Server everytime. I tried doing it for simple text display (remover powered by Liferay) and it works..
thumbnail
Hitoshi Ozawa, geändert vor 13 Jahren.

RE: Avoiding tomcat restart

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
According to the Liferay's Development Guide, the recommended way to hot deploy a theme seems to be to execute "ant deploy" from the theme directory source.

http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/creating-a-theme
thumbnail
Dominik domih, geändert vor 13 Jahren.

RE: Avoiding tomcat restart

Junior Member Beiträge: 57 Beitrittsdatum: 10.11.08 Neueste Beiträge
Sorry for my late reply, I did not get an email notification.. ?!

Since I pasted the properties into my portal-ext.properties and restarted the server once more, my changes to the velocity templates were applied immediately..
thumbnail
Hitoshi Ozawa, geändert vor 13 Jahren.

RE: Avoiding tomcat restart

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Since I pasted the properties into my portal-ext.properties and restarted the server once more, my changes to the velocity templates were applied immediately..


I think the the way Liferay suggests is to define it in the portal-developer.properties.

http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+Developer+Mode