|Re: Source Not Found and JDOMException [message #191111 is a reply to message #191103]
||Wed, 04 April 2007 20:07
| Larry Isaacs
Registered: July 2009
The PDE, which handles the project Library feature, doesn't handle J2EE |
issues like J2EE project's being hosted on by server as opposed to being
executed directly like Java applications. The PDE also doesn't know how
to include a project's Library jars in the server's classpath hierarchy.
WTP could automatically include project Libraries in the webapp's
WEB-INF/lib. However, it doesn't know for sure if it should or
shouldn't because it doesn't know the full story of what is present by
default in the server's classpath hierarchy. Thus, WTP needs you to say
which jars are needed by your project just at build time (i.e. added as
a Library) or needed at runtime too (i.e. added to the WEB-INF/lib or in
J2EE Module Dependencies, which also includes the jar as a Library). If
you had placed jdom.jar in Tomcat's "shared/lib" (under catalina.base),
adding it to the project as just a Library would have been the correct
thing to do.
> I want to thank you so much for you help. You assumption was correct
> that it is a Dynamic Web Project. I added the jdom.jar to the J2EE
> Module Dependencies and that corrected the issue. However, I have a
> follow-up question. I had originally added the same jars into the
> Properties->Build Path->Libraries where it created a copy of the
> jdom.jar in the project. Why did adding it to the J2EE Module
> Dependencies work and adding it to the project Library not work?
> I have added jars that had dependencies before to the libary as external
> jars and not had this problem. For future reference I would like to
> understand the differences between the J2EE Module Dependencies and
> adding the jar to the Project.
Powered by FUDForum
. Page generated in 0.10391 seconds