I need to place a new jar file into lib while server is running. How can we load this jar(entirely a new file) into tomcat's current classpath without restarting the server.
You could if you wrote your own custom class loader or, if you set your app to privileged, you could do whatever is is that the manager app does when it restarts an app. It's open source so you can look for yourself.
There is also another option of the <Context .../> element that allow you to make your app reloadable. This will cause the app to be reloaded any time a class file or jar file is uploaded. There is a small performance penalty but it's never been noticable to me.
First one will be the best option in this case. As Context.reload() loads only the classes if they are already in the classpath, here we are adding a new jar file(all new classes).
am i correct?
Don't get me started about those stupid light bulbs.