jakarta-eebuildpathweb-inf

What is difference between adding jar to WEB-INF/lib folder & BuildPath


What's their(in buildpath jars and in WEB-INF/lib jars) duty?

Thanks.


Solution

  • Build path jars are not a part of your web app.
    On the other hand, the WEB-INF/lib jars are a part of your project.

    The advantage of having WEB-INF/lib jars over build path jars is that they get bundled into your app when generating a WAR file.
    This comes in handy when you want to deploy your app on some server where you don't have permission to modify the jars in the build path.

    Hope this helps!