Hello Iam working with tomcat(in Unix environment),my web server is not loading the .class file once i compile,so every time i compile, i have to restart my webserver. i have my class file and java file in webapps/ROOT/WEB_INF/classes.i don't know whether it takes time or i have to do something to get the .class file automatically loaded. Thank for your time. Raj
This is a typical problem. Being able to dynamically reload classes is the exception rather than the normal behaviour, so Yes, you do have to restart every time you change a class file. You'd find the same thing if you were designing a Swing application. If you start the application, access a class and then alter and recompile the class, you won't see the changes without restarting the application. This expectation has been created (I believe) by the dynamic reloading of JSPs. This is a longer topic than I have time to write right now Dave
Um, yeah, right. The other option that is available if your server supports it and you have written your code properly, is the ability to restart invividual web applications. This is only one step better, but if you have a heavy server (eg WebSphere) running multiple web applications, this is definitely preferable. Dave
Tomcat supports reloading individual applications. Since 4.1.12, there is a manager application that you can use to reload a web app, and since I forget when, you can specify the application as 'reloadable' in the server.xml config file.
This is not hard stuff, though some people have had flakey behaviour with reloadable, I think this has mostly been addressed in later releases.