Search code examples
javajakarta-eewebclasspathweb-inf

what is the difference between simple project/lib and project/web/WEB-INF/lib?


what is the difference between simple project/lib and project/web/WEB-INF/lib? which jar should be in project/lib folder and which jars should be in web/WEB-INF/lib?


Solution

  • there is no standard project/lib thing, it might be a specific project designed that way to hold library there and while compiling and deploying it might be configured to read jars from there,

    where as if you put it in WEB-INF/lib web contains puts all the jars from this directory in runtime classpath so they would be available when application is running

    better to use maven without needing to holding library in source control and with lots of other advantages maven brings