Reputation: 45481
It seems intellij clears all tomcat related folders across a redeploy/restart. This means every time we restart tomcat from IntelliJ, we have to re-login to our app.
Is there any way to persist tomcat sessions across restarts when using it from within IntelliJ Idea?
Upvotes: 1
Views: 1851
Reputation: 30088
The IntelliJ configuration for a local Tomcat instance has a checkbox for "Preserve sessions across restarts". Check that, and the sessions should be preserved.
By the way, I've seen a number of developers waste a lot of time over the years messing around with the Tomcat plugins in Eclipse and IntelliJ, trying to figure out how to get them to work in a manner similar to production.
The easiest answer by far is to just use a regular Tomcat instance, and forego the IDE integration. One easy thing to do to replace this, if you are using Maven (you are using a build tool, aren't you?) is to use the maven tomcat plugin.
Upvotes: 6