tags:

views:

2168

answers:

2

I am developing a portlet for Liferay Portal.

I have disabled CSS and JavaScript caching by using these codes in portal-developer.properties file:

theme.css.fast.load=false
theme.images.fast.load=false
javascript.fast.load=false
javascript.log.enabled=true
layout.template.cache.enabled=false
last.modified.check=false
velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter=false

But I don't know how to disable portlet caching.

When I update view.jsp file in my portlet directory I have to restart Tomcat to see changes.

A: 

I've had such problems with some misaligned clocks: When you edit the jsp through a network mount and your computer believes it's 10:00 while the server believes, that it's already 10:05, this is what might happen:

  • You change the jsp at 10:01
  • The tomcat sees it and compiles - everything works as expected, but the compiled page has a timestamp of 10:06
  • You change the jsp again at 10:03
  • Tomcat sees the changed timestamp and compares it with the timestamp of the compiled page: The compiled page is newer (timestamp-wise), so no compilation is done and the page doesn't reflect your update
  • You get frustrated, restart tomcat, which takes 2 minutes
  • You correct another error in the page, now it's timestamped 10:07
  • Tomcat picks it up, compiles it...

Also, I believe to remember some "Context" configuration enabling to change jsp translation behaviour. Are you working on an unchanged liferay/tomcat bundle? Does the same happen when you're working on just one machine? Does the same thing happen when you take a new bundle, unzip and retry?

Olaf