Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Joseph Bashir
Avoiding tomcat restart
13 novembre 2008 23.14
Risposta

Joseph Bashir

Punteggio: New Member

Messaggi: 7

Data di Iscrizione: 18 agosto 2008

Messaggi recenti

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
RE: [Liferay Forums][3. Development] Avoiding tomcat restart
14 novembre 2008 4.48
Risposta

Matt King

Punteggio: Junior Member

Messaggi: 61

Data di Iscrizione: 10 luglio 2008

Messaggi recenti

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
Alex Wallace
RE: Avoiding tomcat restart
14 novembre 2008 7.57
Risposta

Alex Wallace

Punteggio: Liferay Master

Messaggi: 640

Data di Iscrizione: 4 novembre 2007

Messaggi recenti

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!
Dominik Hofbauer
RE: Avoiding tomcat restart
10 aprile 2011 17.42
Risposta

Dominik Hofbauer

Punteggio: Junior Member

Messaggi: 56

Data di Iscrizione: 10 novembre 2008

Messaggi recenti

As you maybe already know and to solve the thread, here is the solution for your problem (working in lr 523)


1
2#
3# Velocity Reloading (only for development)
4#
5    file.resource.loader.path = templates
6    file.resource.loader.cache = false
7    velocimacro.library.autoreload = true
Hitoshi Ozawa
RE: Avoiding tomcat restart
10 aprile 2011 19.57
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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
Vishal Mehta
RE: Avoiding tomcat restart
10 aprile 2011 23.56
Risposta

Vishal Mehta

Punteggio: Junior Member

Messaggi: 42

Data di Iscrizione: 7 marzo 2011

Messaggi recenti

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..
Hitoshi Ozawa
RE: Avoiding tomcat restart
11 aprile 2011 17.38
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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
Dominik Hofbauer
RE: Avoiding tomcat restart
12 aprile 2011 12.44
Risposta

Dominik Hofbauer

Punteggio: Junior Member

Messaggi: 56

Data di Iscrizione: 10 novembre 2008

Messaggi recenti

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..
Hitoshi Ozawa
RE: Avoiding tomcat restart
12 aprile 2011 19.43
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

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