Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Managing external libs for webapp
Managing external libs for webapp [message #504667] Tue, 22 December 2009 01:05 Go to next message
David Kerber is currently offline David KerberFriend
Messages: 100
Registered: July 2009
Senior Member
I had asked this question on the newcomer group, and the referred me to
the wtp group for more information. The only suggestion I got over
there was to drop everything in WEB-INF/lib.


I have been using Eclipse for 3 years or so for maintaining a medium-
sized tomcat webapp; using 3.5.2 right now on tc 5.5.25 and 6.0.20.
I've always been able to get deployments to work, but sometimes it takes
a bit of trial and error to do so, so I'm looking for a reference that
might help me get things working the first time.

My app uses a utility jar that we have written, plus a half-dozen or so
3rd-party libs. Some of these libs are referenced only in the utility
jar project, some only in the webapp, and some in both. The issue is
where to set up the external libraries in my webapp in the project
properties, things like commons-net, activation.jar. mail.jar, jakarta-
oro, etc, so that when I deploy my app to a new system, all the required
external libs will be available for the webapp.

It doesn't make sense to me why (for example), I need to put jakarta-oro
in both the libraries tab of the build path dialog, and in the Java EE
module dependencies, while others like standard.jar and jstl.jar work
fine when they are only in the libraries tab, and not in the Java EE
module dependencies.

Can somebody point me to a reference that explains what each of these
external library locations are for, when to use each of them, and when
to use the "order and export" tab? I'd greatly appreciate it.

Thanks!
D
Re: Managing external libs for webapp [message #504725 is a reply to message #504667] Tue, 22 December 2009 10:48 Go to previous messageGo to next message
Philippe Marschall is currently offline Philippe MarschallFriend
Messages: 121
Registered: July 2009
Senior Member
On 22.12.2009 02:05, David Kerber wrote:
> I had asked this question on the newcomer group, and the referred me to
> the wtp group for more information. The only suggestion I got over
> there was to drop everything in WEB-INF/lib.
>
>
> I have been using Eclipse for 3 years or so for maintaining a medium-
> sized tomcat webapp; using 3.5.2 right now on tc 5.5.25 and 6.0.20.
> I've always been able to get deployments to work, but sometimes it takes
> a bit of trial and error to do so, so I'm looking for a reference that
> might help me get things working the first time.
>
> My app uses a utility jar that we have written, plus a half-dozen or so
> 3rd-party libs. Some of these libs are referenced only in the utility
> jar project, some only in the webapp, and some in both. The issue is
> where to set up the external libraries in my webapp in the project
> properties, things like commons-net, activation.jar. mail.jar, jakarta-
> oro, etc, so that when I deploy my app to a new system, all the required
> external libs will be available for the webapp.
>
> It doesn't make sense to me why (for example), I need to put jakarta-oro
> in both the libraries tab of the build path dialog, and in the Java EE
> module dependencies, while others like standard.jar and jstl.jar work
> fine when they are only in the libraries tab, and not in the Java EE
> module dependencies.
>
> Can somebody point me to a reference that explains what each of these
> external library locations are for, when to use each of them, and when
> to use the "order and export" tab? I'd greatly appreciate it.

Use Maven to manage the dependencies with the right scopes (eg. provided
for jstl) and let it generate the WTP projects. Never worry again about
setting up a WTP project or keeping your release build in synch with
your WTP setup.

Cheers
Philippe
Re: Managing external libs for webapp [message #504780 is a reply to message #504667] Tue, 22 December 2009 16:10 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

David Kerber wrote:
> I had asked this question on the newcomer group, and the referred me to
> the wtp group for more information. The only suggestion I got over
> there was to drop everything in WEB-INF/lib.
>
>
> I have been using Eclipse for 3 years or so for maintaining a medium-
> sized tomcat webapp; using 3.5.2 right now on tc 5.5.25 and 6.0.20.
> I've always been able to get deployments to work, but sometimes it takes
> a bit of trial and error to do so, so I'm looking for a reference that
> might help me get things working the first time.
>
> My app uses a utility jar that we have written, plus a half-dozen or so
> 3rd-party libs. Some of these libs are referenced only in the utility
> jar project, some only in the webapp, and some in both. The issue is
> where to set up the external libraries in my webapp in the project
> properties, things like commons-net, activation.jar. mail.jar, jakarta-
> oro, etc, so that when I deploy my app to a new system, all the required
> external libs will be available for the webapp.
>
> It doesn't make sense to me why (for example), I need to put jakarta-oro
> in both the libraries tab of the build path dialog, and in the Java EE
> module dependencies, while others like standard.jar and jstl.jar work
> fine when they are only in the libraries tab, and not in the Java EE
> module dependencies.
>
> Can somebody point me to a reference that explains what each of these
> external library locations are for, when to use each of them, and when
> to use the "order and export" tab? I'd greatly appreciate it.

Everything in the WEB-INF/lib folder is automatically on your Java
Build Path _and_ deployed in your application. The Java Build Path
property page is used for specifying anything further required you
build your application, while you specify anything needed at runtime
(and thus needing to be deployed as well) using the Java EE Module
Dependencies page.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Managing external libs for webapp [message #504817 is a reply to message #504780] Tue, 22 December 2009 19:07 Go to previous message
David Kerber is currently offline David KerberFriend
Messages: 100
Registered: July 2009
Senior Member
In article <hgqr1j$l6o$1@build.eclipse.org>, nitind@us.ibm.com says...
>
> David Kerber wrote:

....

> > My app uses a utility jar that we have written, plus a half-dozen or
so
> > 3rd-party libs. Some of these libs are referenced only in the utility
> > jar project, some only in the webapp, and some in both. The issue is
> > where to set up the external libraries in my webapp in the project
> > properties, things like commons-net, activation.jar. mail.jar, jakarta-
> > oro, etc, so that when I deploy my app to a new system, all the required
> > external libs will be available for the webapp.

....

> Everything in the WEB-INF/lib folder is automatically on your Java
> Build Path _and_ deployed in your application. The Java Build Path
> property page is used for specifying anything further required you
> build your application, while you specify anything needed at runtime
> (and thus needing to be deployed as well) using the Java EE Module
> Dependencies page.

It sounds like you're saying that the Java EE Module Dependencies page
will essentially duplicate the effect of copying to the WEB-INF/lib
folder.

So am I interpreting this correctly when I understand that the preferred
method of including those external libs is just to copy them into the
WEB-INF/lib folder, and not mess with anything in the build path dialog?

D
Previous Topic:Connection refused: connect error
Next Topic:When will WTP release a server runtime for JBoss 6?
Goto Forum:
  


Current Time: Tue Apr 23 15:04:12 GMT 2024

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

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

Back to the top