HotSwap with Tomcat reloads context??
Hey everybody,
I'm developing in IDEA 4.5.1 with Tomcat 5 using the Tomcat debug config.
Whenever I modify a class, and hit Make Project (CTRL-F9), IDEA asks if I want to Reploy the webapp. I hit "No". Then it asks if I want to HotSwap, and I hit "Yes". But, at this point I notice that Tomcat 5 is reloading my webapp anyway..
So, my session is gone, and I have to login again.
When I was debugging with IDEA 4 and Tomcat 4, (and using an Application Debug config, instead of the Tomcat Debug config), when I would hotswap, it would simply hotswap, and not reload the whole webapp.
Anything I can do to prevent this?
Thanks!
Ian.
Please sign in to leave a comment.
Hello Ian,
Un-check the "Deploy after compilation" setting under Compiler settings.
Thanks,
--Venkat.
It was set to "Ask". You mean I should set it to "Never"?
If it's on "Ask", shouldn't pressing "No" not redeploy?
Ok, I set it to "Never", but Tomcat still reloads the webapp whenever I compile, even if I don't hotswap.
o_O
I have the same situation. TC4 allows seamless recompiles, but TC5
reloads the context. Maybe someone at JB can comment if this is a JB or
a TC problem.
Norris Shelton
Sun Certified Java Programmer
Ian Zabel wrote:
>Ok, I set it to "Never", but Tomcat still reloads the webapp whenever I compile, even if I don't hotswap.
>
>
>o_O
>
Hello Norris,
I got this working under TC 5.0.25, I have set "Never" under compiler settings and and under "Debugger settings" I have set it to "Always".
Thanks,
--Venkat.
>> Ok, I set it to "Never", but Tomcat still reloads the webapp whenever
>> I compile, even if I don't hotswap.
>>
>> o_O
>>
ARGH. I set those settings in my env, and I still get the same behavior. :(
This completely stinks. It's like developing before HotSwap was around all over again.
Every time I change some code, I have to login to the app again, and work my way all the way back to the page I was fixing. :(
Hello Ian,
It works for me and others ... Try re-creating your web module.iml from scratch.
By any chance did you have reloadable="true" in your context specific xml file or in the server.xml?
Thanks,
--Venkat.
I looked at my C:\IntelliJ-IDEA-4.5.1\system\tomcat_OrderIt_b418ee91\conf\Catalina\localhost\ROOT.xml file, and yes, reloadable="true". (I'm running as ROOT context)
Should this be false?
Hello Ian,
Why is reloadable="true"? Did you set it in your TOMCAT_HOME\conf\Catalina\localhost\ROOT.xml?
It should be false.
Thanks,
--Venkat.
I think it was true because it was true in CATALINA_HOME\conf\server.xml
I changed it to false in that file based on Maxim Mossienko's suggestion, and it seem to be working as expected now!
Thanks for the help gents!
Ian.