简体   繁体   中英

Server is not loading/compiling the latest version of code in Eclipse?

A few days back, while the built-in server (Tomcat v5.5) in eclipse was running, and while I was modifying the code, the server used to recompile and restart itself. I've gotten into a problem from the last day, where, the server DOESN'T load the LATEST version of the code I'm writing, instead, (I'm assuming) it compiles its own internal cache. Yesterday evening, I fixed that problem by (as I can remember) by clearing some cache or something. But, I did the same today, and its malfunctioning in both ways -- by not compiling the latest version and -- not auto restarting when I modify the code. I've even tried restarting eclipse but the server is still compiling its own code which CAN'T be seen in the workspace.

[EDIT]

I've now resolved the problem which was with something with importing the right add-on library to the working directory.

改用码头?

While the embedded Tomcat in Eclipse should recompile the classes/JSP:s/whatever it falls victim of its own caching which causes it to load old versions of the classes after reloading. So yes, the new classes actually exist in the embedded Tomcat but since the cache isn't cleaned properly (or maybe not at all) it won't reload classes automatically and thus has to be restarted every single time you've made a change.

Additionally it seems that there's some bugs in the Eclipse Server controller which causes the auto-reloading to just stop working at times. Basically it's a bit of a mess and all you can do is to restart it continuously. Or use Jetty which is a lot faster to use when developing.

I have occasionally found that Eclipse gets confused about something, and frequently the easiest way is just to dump the current Eclipse tree, and unpack a new one, in which you rebuild your workspace.

We use projectSet.psf's in our source repository which makes the above process something that can be done in about a minute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM