开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜