Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Getting referenced projects into the webapp classpath
Getting referenced projects into the webapp classpath [message #106357] Fri, 20 May 2005 13:22 Go to next message
Eclipse UserFriend
Hi,

I installed WTP M4 by downloading the complete ZIP file including
Eclipse SDK 3.1M6.

So far everything works fine, I created a Flexible Project and a J2EE
Web Module inside. I wrote a very simple Servlet and experimented a
little bit with JSP's (-> the Editor is great!)

I want to convert my existing Web Projects into J2EE Web Modules but I
can't figure out how to work with references to other Projects inside a
Web Module.

All of my Web Applications depend on other simple Java Projects which
are included in the Build Path - how is it possible to get a Tomcat 5.5
instance to load the classes of the depending Projects when I publish my
web app on the server?

cheers

tOM
Re: Getting referenced projects into the webapp classpath [message #106605 is a reply to message #106357] Sun, 22 May 2005 20:42 Go to previous message
Eclipse UserFriend
Thomas Einwaller wrote:
> Hi,
>
> I installed WTP M4 by downloading the complete ZIP file including
> Eclipse SDK 3.1M6.
>
> So far everything works fine, I created a Flexible Project and a J2EE
> Web Module inside. I wrote a very simple Servlet and experimented a
> little bit with JSP's (-> the Editor is great!)
>
> I want to convert my existing Web Projects into J2EE Web Modules but I
> can't figure out how to work with references to other Projects inside a
> Web Module.
>
> All of my Web Applications depend on other simple Java Projects which
> are included in the Build Path - how is it possible to get a Tomcat 5.5
> instance to load the classes of the depending Projects when I publish my
> web app on the server?
>
> cheers
>
> tOM


Tom,

For Tomcat to load the classes from the Java project for the Web
Application you need to add the Java projects as a referenced project to
the Web module project. The way you do this is by adding a referenced
component with the consumes reference type in the .wtpmodules file of
the flex project that contains the web component

<dependent-module deploy-path="/"
handle="module:/resource/FlexProject/UtilProject">
<dependency-type>consumes</dependency-type>
</dependent-module>

Look at the javadoc of IVirtualReference interface -
DEPENDENCY_TYPE_USES and DEPENDENCY_TYPE_CONSUMES statics to get more
details

Hope this helps
Previous Topic:WTP M3/M4 -- Tomcat 5.0.28 -- META-INF/ context.xml not being processed
Next Topic:Where can I find org.eclipse.wst.common.modulecore.ModuleCore
Goto Forum:
  


Current Time: Fri Jul 18 00:08:09 EDT 2025

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

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

Back to the top