Turning off IntelliJ Auto-save
You can disable the recompilation by enabling Power Save Mode.
When Power Save Mode is on, IntelliJ IDEA reduces its functionality to the one of a text editor, by not executing expensive background activities that drain laptop battery. These activities include error highlighting and on-the-fly inspections, autopopup code completion , and automatic incremental background compilation.
Alternatively, or if you think this is a bit too extreme, change the update action for your Tomcat to "Do Nothing".
It cannot be totally disabled. It is core to the functionality of the IDE and heavily integrated into its operation, including its Open API (for plugins). Turning it off would cause problems with a lot of features.
You can disable both Save files on frame deactivation
and Save files automatically if idle for x seconds
settings (via File > Settings > Appearance & Behavior > System Settings):
With those settings disabled, IDEA only auto-saves on a major event such as building, running make, running a test or application, etc. <EDIT>It should also be noted that plugin authors have access to the FileDocumentManager.saveAllDocuments() method that invokes the auto-save. This is also one more reason why removing this functionality would be problematic.</EDIT> Scrolling up in a file should not be an event to trigger auto save (unless a third party plugin is doing such). I waited a good 15 minutes to verify - no auto-save. If you are seeing different behavior, I would recommend you open up a bug report (https://youtrack.jetbrains.com). You'll want to provide as much detail as possible since IDEA 14.0.2 has been out for quite some time and there are no reports of an issue with auto-save.
Note that I have the Settings > Editor > General > Editor Tab > Mark Modified tabs with asterisk
turned on to verify the file is not being auto-saved. (i.e. the asterisk remains even after a long idle period and when I reactivate the IDEA frame.) Have you turned that on? It may be something else besides auto-save that is causing the other tools to see a file change. Enabling the asterisk option would help determine that.
Why you really don't need manually saving
It should also be noted, that you always have access to Local History. Local History constantly tracks (and records) all changes made to a project. And it allows you to easily revert a file, or an entire directory, back to a previous state (even unsaved ones). So any perceived loss of functionality by not being in full control of when a file is saved is made up for with this functionality. When I first started using IntelliJ IDEA in 2003, I found the auto save functional strange and felt that I lost some control as to determine when I wanted files included in a recompile. But as I used IntelliJ IDEA, I quickly (within a week or two) came to realize that this was a false feeling of control. Between local history, changelists, and the ability to shelf changes, I ultimately had a lot more control while at the same time didn't waste time trying to figure out why my recent change was not working, only to realize I forgot to save one of the files I changed. I switch from disliking the feature to absolutely loving it. I'd encourage people that see the auto save as a "limitation" or even a "deal breaker" to just try it for a while and see. It will require some changes to your personal workflow, I think in the end you will have a better workflow. I have not missed it in the past 16+ years I've been using IDEA.
EDIT
Are you launching Tomcat via an IntelliJ IDEA run/debug configuration? If so, do you have the "on frame deactivation" option in that Run/Debug configuration set to one of the "Update" options? That would cause the files to change.
I think the correct answer was given as a comment from ryanlutgen above:
The beaviour of "auto-saving" your file is not due to the auto-save options mentioned.
IJ saves all changes to your build sources to automatically build the target.
This can be turned of in:
Preferences -> Build,Execution,Deployment -> Compiler -> Make project automatically
.
Note: now have to initiate the project build manually (e.g. by using an appropriate key-shortcut)
(All other "auto-save" options just fine-tune the build in auto-save behaviour.)