This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes WEB-INF - Jar of Jars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "WEB-INF - Jar of Jars" Watch "WEB-INF - Jar of Jars" New topic

WEB-INF - Jar of Jars

Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
Mine is a web application. I have created a Jar containing some custom code and a few 3rd party jars. I have copied the custom jar to WEB-INF/lib folder. The 3rd party jars inside my jar are not visible to the application during deployment/runtime? I have no idea how to make them visible. Please help.


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63348

Any jars in WEB-INF/lib at application startup will be part of the application classpath.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pete Nelson
Ranch Hand

Joined: Aug 30, 2010
Posts: 147

Don't bundle the third-party jars inside your custom jar file - your servlet container will not be able to find them there. Simply put those third party jar files in your WEB-INF/lib along side your jar file of custom code.

In preparing for battle I have always found that plans are useless, but planning is indispensable. -- Dwight D. Eisenhower
I agree. Here's the link:
subject: WEB-INF - Jar of Jars
It's not a secret anymore!