eclipse Library Classpath and Web-inf\Lib
What difference between adding library by "add external jar" and putting those jars to web-inf\lib? What should I do for adding my external jars to my web dynamic 开发者_JS百科project in eclipse Add by class-path or putting into web-inf\lib folder?
Regards
When you add jar in the web-inf folder, they are packaged as part of your war file(assuming using some build tool like ant) and when your application is deployed or run it resolve dependencies using those jars.
But when you add jar in the eclipse using add external jar, it is just part of .classpath file for eclipse and resolve dependencies with in eclipse and doesn't get packaged. It can be used when you don't want some jar to be packaged with application like servlet jars which are already present in your server libraries.
精彩评论