Do have to restart Tomcat every time I recompile a bean?

JIA Java Italian Association

It depends on how the context of your application its configured (check the reload attribute in the Context tag of tomcat configuration (normally conf/server.xml), and where that bean it's located. If the bean it's located in the WEB-INF/classes or WEB-INF/lib of your application and the reload attribute is set to true, no, you do not really need to restart. If the beans are in the common tomcat directory ($tomcat_home/lib or $tomcat_home/classes), yes you have to.

Be careful when you recompile beans without restarting. Sometimes you can get ClassCastExceptions if you try to use beans previously stored in a session or application scope.