Liferay 6.0.6 / JBOSS - How can I edit JavaScript in a portlet without constantly re-deploying? -



Liferay 6.0.6 / JBOSS - How can I edit JavaScript in a portlet without constantly re-deploying? -

i'm trying prepare tricky javascript issue in liferay portlet (that happens run big flex app) , every time create change, have go prompt , "ant deploy" on portlet, wait deploy, reload page, wait flex app load. every time seek minor alter takes 3-4 minutes whole process.

is there configuration or setting uncompress javascript , allow me straight edit js files on server without re-deploying every time? i've read on "developer mode" doesn't seem working, , liferay docs seem specific tomcat whereas i'm using jboss.

if deploying war file, explode in place (in jboss deploy directory), rather having 1 compressed file called flexport.war, have directory called flexport.war have exploded content original war file.

if update javascript files, might need clear cache in browser, otherwise should take effect right away. if update classes, can cause fast re-deploy touch-ing war/web-inf/web.xml file.

===========================================================

not sure why you're not seeing js update, seek reproducing sequence. helps have browser tool firebug or fiddler installed can see response headers.

retrieve js file straight browser. e.g. http://localhost:8080/js/admin/jquery-ui-1.8.12.custom.min.js make note of last-modified response header. modify js file , save. (make sure filesystem timestamp of file has changed) retrieve js file again. last-modified response header should incremented same value timestamp filesystem timestamp. make sure http response code 200 , not 304 (not modified).

if still seeing same timestamp after file modification:

it browser caching (see 304 comment above) i suppose liferay might caching content, changes on file scheme not take effect until redeploy war. if case, seek *touch*ing myportlet.war/web-inf/web.xml file cause war redeployed. not efficient, faster reissuing ant command.

a quickie google revealed link liferay static content caching. seems liferay may indeed caching stuff in ehcache. if case portlet app, have 2 choices:

turn off caching (in dev only, of course) setting property in portal-ext.properties: com.liferay.portal.servlet.filters.cache.cachefilter=false

if liferay registers jmx interfaces ehcache, may able surgically remove target items cache through jmx-console or twiddle. either one, 1 time figure out exact operation, can create batch file execute on demand on command line.

javascript jboss liferay portlet

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -