This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes A question about placing jars in a Web Applicaation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "A question about placing jars in a Web Applicaation " Watch "A question about placing jars in a Web Applicaation " New topic
Author

A question about placing jars in a Web Applicaation

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,
I have a question may be silly to some one .
My question is that , when we are working with a Web Application , when do we need to place the jar fie inside the WEB-INF/lib , rather than simply making them aviable in the class path (FOR EXAMPLE ADDING TO Build path in Eclipse ) ??

Could anybody please tell me the answer ??

Thank you very much .


Save India From Corruption - Anna Hazare.
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

You have to do both , set them in the classpath and also place them under the lib folder


Learning and Learning!-- Java all the way!
Nam Ha
Ranch Hand

Joined: Aug 05, 2011
Posts: 50

In my opinion, putting jar files under WEB-INF/lib for portability, i.e you can deploy the Web Archive (WAR) file anywhere without worrying to putting jars to the class path.


Java Object Creation
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
This would clear your doubts.
 
 
subject: A question about placing jars in a Web Applicaation
 
Similar Threads
Unable to connect to database
Servlet Write a file to server
Tag-files in a jar Question
Servlet mapping
finding the exact path in a file system