Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Javascript hot refresh?(JS not automatically refreshed on resource save?)
Javascript hot refresh? [message #990394] Wed, 12 December 2012 09:46 Go to next message
jim tod is currently offline jim todFriend
Messages: 1
Registered: December 2012
Junior Member
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 18:12 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
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
Previous Topic:[Solved] JSDT Debug Tools
Next Topic:Breakpoint in .jspf
Goto Forum:
  


Current Time: Sun Dec 21 02:53:19 GMT 2014

Powered by FUDForum. Page generated in 0.01532 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software