If you want the long explanation, I think you can search this forum and find one. Ever so often I go on a long-winded rant about why
you should never try and write into any part of a web application. Short answer: because it doesn't always work. Treat the app as something read-only that isn't necessarily a real directory with real files in it.
Eclipse isn't a web server, so if your webapp is attempting to write to itself, Eclipse doesn't get involved - all it's doing is running a copy of Tomcat in embedded mode. Technically, Tomcat's not doing it either. You're doing it to yourself in your webapp code.
But as I said, you'll have a happier life if you don't do it at all.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.