Hi Simon,

It has been so long that I don't remember for certain why the Tomcat work 
directory needed cleaning.  I'm fairly sure there was a reason.  A guess is 
that Tag libraries destined to be in a jar wouldn't pickup changes when you 
used "Serve modules without publishing".  Tomcat would cache data in the work 
directory about the Tag library and assumed that since the Tag library was 
supposedly coming from a jar, if it found the cached data, it didn't need to 
reprocess the Tag library.  I should probably check Tomcat 8 and perhaps Tomcat 
7 to see if Tag libraries are still handled this way.

Cheers,
Larry

From: wtp-dev-boun...@eclipse.org [mailto:wtp-dev-boun...@eclipse.org] On 
Behalf Of Wang, Simon
Sent: Thursday, July 31, 2014 5:57 AM
To: wtp-dev@eclipse.org
Subject: [wtp-dev] [Tomcat-WTP-Hotswap] Why clean up server every time even 
there is only one resource file change?

Hi, Team,

I'm using Kepler-SR2 and using WTP-3.5.2 to work on a J2EE project.

My problem is:
After started server, I change one js file, save it.
After "publishing to server...", I notice 
"workspace\sample-js-issue\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost"
 is cleaned up.
You know all JSP compiled classes and tag files there.

That means if I change any resources, WTP tomcat plugin will clean up those 
files, when I access page again, will regenerate them again.
That's time consuming task.

I went through "org.eclipse.jst.server.tomcat.core" code.
Here is my finding:
TomcatServerBehaviour.publishServer(), this method will be triggered, and it 
will clean up server (include above "work" directory ).

But point is: why only js/css resources change, need to clean up "work" 
directory?

I added a patch to avoid run "publishServer", it won't remove "work" folder 
anymore.
And tried different hotswap features, it works fine.
So want to double confirm with you guys, is there any special reasons to run 
"publishServer" everytime?

Regards
Simon
_______________________________________________
wtp-dev mailing list
wtp-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Reply via email to