Javascript hot refresh? [message #990394] |
Wed, 12 December 2012 04:46  |
Eclipse User |
|
|
|
Hi,
I'm not sure if this is even the right place to ask this question but... I've inherited a Java app which is being developed in Eclipse with WTP.
I can build and deploy the application fine using tomcat (to the .metadat tmp0 folder) and everything runs fine but my JS changes are not being hot deployed even though the JS files are updated in the tmp0 directory. To get the updated JS I have to manually stop and restart the application(The browser cache has been cleared of course!).
Is this intended behaviour? If so how do I change it so that the updated JS is served by the application running in Eclipse without a restart?
I have tried the obvious options like 'Automatically publish when resources change', and I can see the timestamp changing on the JS files in tmp0 when I save them in Eclipse - Any advice would be appreciated?
Thanks!
|
|
|
Re: Javascript hot refresh? [message #990697 is a reply to message #990394] |
Wed, 12 December 2012 13:12  |
Eclipse User |
|
|
|
On 12/12/2012 7:18 AM, jim tod wrote:
> Hi,
> I'm not sure if this is even the right place to ask this question but...
> I've inherited a Java app which is being developed in Eclipse with WTP.
> I can build and deploy the application fine using tomcat (to the
> .metadat tmp0 folder) and everything runs fine but my JS changes are not
> being hot deployed even though the JS files are updated in the tmp0
> directory. To get the updated JS I have to manually stop and restart the
> application(The browser cache has been cleared of course!).
>
> Is this intended behaviour? If so how do I change it so that the updated
> JS is served by the application running in Eclipse without a restart?
> I have tried the obvious options like 'Automatically publish when
> resources change', and I can see the timestamp changing on the JS files
> in tmp0 when I save them in Eclipse - Any advice would be appreciated?
>
> Thanks!
If the updated file is getting copied to the appropriate location under
"tmp0" then WTP has done all it can do. The rest is up to Tomcat. I
believe there is a feature that for performance reasons, Tomcat supports
caching static content. The documentation on Context[1] configuration,
suggests this is enabled by default but should detect changes to the
files after a default of 5 seconds. You may want to try setting
cachingAllowed to false in the context.xml under the Servers project in
your Eclipse workspace and see if this avoids the need to restart Tomcat
to clear that cache.
Cheers,
Larry
[1] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
|
|
|
Powered by
FUDForum. Page generated in 0.03032 seconds