4

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

Thanks.

Utku Soytaş
  • 1,475
  • 2
  • 19
  • 30

2 Answers2

3

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!

S1LENT WARRIOR
  • 11,704
  • 4
  • 46
  • 60
2

Buildpath jars

  • Plus: Help reduce your WAR size, Shared between applications
  • Minus: Class path jar soup - version conflicts

WEB-INF/lib jars

  • Plus: Useful to avoid version conflicts
  • If you package single application into component jars you could prefer to keep it neatly packaged inside WAR
Teddy
  • 4,009
  • 2
  • 33
  • 55