Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Project Libraries(Spring Framework)
Project Libraries [message #1328910] Fri, 02 May 2014 23:19 Go to next message
Moe B is currently offline Moe BFriend
Messages: 8
Registered: April 2014
Junior Member
I followed some Spring MVC tutorials and imported the Spring libraries using the import external jars in the build path but I got exceptions from tomcat. Then I put the same libraries in my web-inf/lib folder and all was well. What is the difference between having libraries in the libraries place vs in web-inf/lib?
Re: Project Libraries [message #1329460 is a reply to message #1328910] Sat, 03 May 2014 05:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31548
Registered: July 2009
Senior Member
Moe,

I think you have to put them where the server will know to where find
them not just anywhere that makes the JDT compiler find them and use
them at development time.

On 03/05/2014 1:19 AM, Moe B wrote:
> I followed some Spring MVC tutorials and imported the Spring libraries
> using the import external jars in the build path but I got exceptions
> from tomcat. Then I put the same libraries in my web-inf/lib folder
> and all was well. What is the difference between having libraries in
> the libraries place vs in web-inf/lib?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Project Libraries [message #1330021 is a reply to message #1329460] Sat, 03 May 2014 12:23 Go to previous messageGo to next message
Moe B is currently offline Moe BFriend
Messages: 8
Registered: April 2014
Junior Member
So we put them in web-inf/lib for the server to find them and in the libraries folders for the compiler to find them? Is that what the difference is between those two locations?
Re: Project Libraries [message #1330241 is a reply to message #1330021] Sat, 03 May 2014 14:58 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 05/03/2014 06:23 AM, Moe B wrote:
> So we put them in web-inf/lib for the server to find them and in the
> libraries folders for the compiler to find them? Is that what the
> difference is between those two locations?

Moe,

When not using Maven (and I don't like to and don't usually do except at
work), I put all my libraries underneath project/lib. Then, I use Build
Path -> Libraries to bring them into my project and Deployment Assembly
to tell Eclipse to deploy them (and it will deploy them to WEB-INF/lib
for you when you build the WAR or run Tomcat from Eclipse.

Note that when you run your application (presumably to debug it) in
Eclipse with Tomcat, your deployment mimics a real Tomcat deployment
artificially on this path:

workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps

....underneath which you'll find project/WEB-INF/lib and all your libraries.

But, yeah, you do have to tell Eclipse one way or another where to find
the libraries. What I've described is how it works in a Dynamic Web Project.
Previous Topic:Cursorposition in Files when using Tasks
Next Topic:Changing project path in Kepler64 (new OS)
Goto Forum:
  


Current Time: Mon Oct 26 04:54:49 GMT 2020

Powered by FUDForum. Page generated in 0.03081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top