Search code examples
javaeclipseservletsweb-inf

Eclipse Dynamic Web Application putting jar files in WEB-INF/lib and Java Build Path


I have a very "basic" question regarding Java web application development (servlet). What is the difference between putting a jar file in WEB-INF/lib and putting it in Java Build Path/Library/External Jar?


Solution

  • Java Build Path/Library/External Jar is only managed by eclipse so if you build war and if your builder (or if you build externally) doesn't copy over these jars to WEB-INF/lib then you would loose them at runtime

    also when you share that code with other developers, or if you use other IDE it will not help

    better to use some standard and mature dependency manager / build tool like maven than copying over library to WEB-INF/lib manually