Question

I have started a new job from a couple months, I work as front developer in a company where up until now everyone was using classic development patterns, but the goal is to move to a new ajax/rest services approach and that's what I do.

In our local development environment our apps run on Resin which runs inside Eclipse and get deployed as war files to C:\Resin\resin-pro-4.0.27\webapps

My problem is that I work mostly on css html and js files, static resources so I shouldn't need to restart Resin and wait 15 seconds (when it doesn't crash) to see the effect of every little piece of code I change.

Other problem is that I need to edit some files in external editors (sublime text for js, Crunch for LESS); I managed to make Eclipse open the external editor but even with the "Refresh using native hooks or polling" build option it takes a while to realize files have changed and restart Resin.

I also tried just working on the unpacked war in C:\Resin\resin-pro-4.0.27\webapps\appname but even there it takes like one minute before you can see the changes on the browser (is there some caching going on the server? can I disable it?)

I welcome any suggestion as all this is really hurting my productivity

Was it helpful?

Solution

inside Resin.xml <host><web-app> add:

  <cache-mapping url-pattern="*.js" expires="0s"/>
  <cache-mapping url-pattern="*.css" expires="0s"/>
  <cache-mapping url-pattern="*.htm" expires="0s"/>
  <cache-mapping url-pattern="*.html" expires="0s"/>

OTHER TIPS

This used to work for me (in resin.xml)

<!--
 - For production sites, change dependency-check-interval to something
 - like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>2s</dependency-check-interval>

Also check resin.properties for a variable definition in newer versions. However I'm currently having problems picking up changes without a full redeploy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top