Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Use other project source in web project question
Use other project source in web project question [message #172685] Thu, 29 June 2006 04:07 Go to next message
Eclipse UserFriend
Originally posted by: calendarw.hotmail.com

Hi,

I have a web project that will be use some of class in another project, so I
added the project in web project build path, when I run the web project in
server, it will not load the related project so it occur some like class not
found exception. So how I can load the related project to solve this
problem?

--
Jr. P
Re: Use other project source in web project question [message #172710 is a reply to message #172685] Thu, 29 June 2006 16:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

calendarw @ Jr.P wrote:
> Hi,
>
> I have a web project that will be use some of class in another project, so I
> added the project in web project build path, when I run the web project in
> server, it will not load the related project so it occur some like class not
> found exception. So how I can load the related project to solve this
> problem?

The web project build path is only used for building, not for running.
For this, you'll need to add a "J2EE Module Dependency".

HTH,
Daniel Serodio
Re: Use other project source in web project question [message #172744 is a reply to message #172710] Thu, 29 June 2006 21:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: anderws.endinfosys.com

"Daniel Serodio" <dserodio@gmail.com> wrote in message
news:e810og$ign$1@utils.eclipse.org...
> calendarw @ Jr.P wrote:
>> Hi,
>>
>> I have a web project that will be use some of class in another project,
>> so I
>> added the project in web project build path, when I run the web project
>> in
>> server, it will not load the related project so it occur some like class
>> not
>> found exception. So how I can load the related project to solve this
>> problem?
>
> The web project build path is only used for building, not for running.
> For this, you'll need to add a "J2EE Module Dependency".
>
> HTH,
> Daniel Serodio

However, the 'J2EE Module dependencies' does not show projects that are in
the
'Java Build Path' -> 'Projects'. So they can not be added.

In a similiar fashion, we use 'User Libraries' for external dependencies,
these are not
picked up for the current project. When in fact I would like them picked up
recursively.
For example I have a UI project that is dependent on user lib 'ADF lib', and
project 'Persist' which is dependent on user lib 'Hibernate lib'

Even if I had to specify them via 'J2EE Module Dependencies', it would
sure beat having to either put them in common or copy them each time the
webapp
was refreshed.

If it makes a difference, I'm running with 'Run modules directly from
workspace' turned
off on running JST 1.5.0v20060515, if that makes a difference.
Re: Use other project source in web project question [message #172751 is a reply to message #172744] Fri, 30 June 2006 02:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: calendarw.hotmail.com

um....
I tried to link the source file and set export into the web project build
path and it look like work, is it good?

--
Jr. P

"Dean" <anderws@endinfosys.com> wrote in message
news:e81h20$hqi$1@utils.eclipse.org...
> "Daniel Serodio" <dserodio@gmail.com> wrote in message
> news:e810og$ign$1@utils.eclipse.org...
>> calendarw @ Jr.P wrote:
>>> Hi,
>>>
>>> I have a web project that will be use some of class in another project,
>>> so I
>>> added the project in web project build path, when I run the web project
>>> in
>>> server, it will not load the related project so it occur some like class
>>> not
>>> found exception. So how I can load the related project to solve this
>>> problem?
>>
>> The web project build path is only used for building, not for running.
>> For this, you'll need to add a "J2EE Module Dependency".
>>
>> HTH,
>> Daniel Serodio
>
> However, the 'J2EE Module dependencies' does not show projects that are in
> the
> 'Java Build Path' -> 'Projects'. So they can not be added.
>
> In a similiar fashion, we use 'User Libraries' for external dependencies,
> these are not
> picked up for the current project. When in fact I would like them picked
> up recursively.
> For example I have a UI project that is dependent on user lib 'ADF lib',
> and
> project 'Persist' which is dependent on user lib 'Hibernate lib'
>
> Even if I had to specify them via 'J2EE Module Dependencies', it would
> sure beat having to either put them in common or copy them each time the
> webapp
> was refreshed.
>
> If it makes a difference, I'm running with 'Run modules directly from
> workspace' turned
> off on running JST 1.5.0v20060515, if that makes a difference.
>
>
Re: Use other project source in web project question [message #172805 is a reply to message #172751] Fri, 30 June 2006 15:46 Go to previous message
Eclipse UserFriend
Originally posted by: anderws.endinfosys.com

Found it. The projects that showed in j2ee dependent have project facets
java and utility. Added those facets to the missing projects. And they
appeared. Restarted the server and it works.

Removed the three projects from the build path and they still don't show up
in the j2ee dependent modules list.
Looked at each of the these products and the src and test directories are
checked and grayed on the export screen.

Took a 4th project that has the 3 other projects on build path (and does
display in the j2ee dependent modules list) on its export screen checked the
3 other projects to export. Added this to the ui project j2ee dependents.
A jar is created for the 4th project but not the other three. The request
still failed with a missing class def.

Noticed that a file was changed by this action
'.settings/org.eclipse.wst.common.component' so copied the
<dependent-module> element and adjusted the name for the 3 projects that it
requires. Now the projects appear in the web libraries, but there is no jar
created for them.


"calendarw @ Jr.P" <calendarw@hotmail.com> wrote in message
news:e82213$7h6$1@utils.eclipse.org...
> um....
> I tried to link the source file and set export into the web project build
> path and it look like work, is it good?
>
> --
> Jr. P
>
> "Dean" <anderws@endinfosys.com> wrote in message
> news:e81h20$hqi$1@utils.eclipse.org...
>> "Daniel Serodio" <dserodio@gmail.com> wrote in message
>> news:e810og$ign$1@utils.eclipse.org...
>>> calendarw @ Jr.P wrote:
>>>> Hi,
>>>>
>>>> I have a web project that will be use some of class in another project,
>>>> so I
>>>> added the project in web project build path, when I run the web project
>>>> in
>>>> server, it will not load the related project so it occur some like
>>>> class not
>>>> found exception. So how I can load the related project to solve this
>>>> problem?
>>>
>>> The web project build path is only used for building, not for running.
>>> For this, you'll need to add a "J2EE Module Dependency".
>>>
>>> HTH,
>>> Daniel Serodio
>>
>> However, the 'J2EE Module dependencies' does not show projects that are
>> in the
>> 'Java Build Path' -> 'Projects'. So they can not be added.
>>
>> In a similiar fashion, we use 'User Libraries' for external dependencies,
>> these are not
>> picked up for the current project. When in fact I would like them picked
>> up recursively.
>> For example I have a UI project that is dependent on user lib 'ADF lib',
>> and
>> project 'Persist' which is dependent on user lib 'Hibernate lib'
>>
>> Even if I had to specify them via 'J2EE Module Dependencies', it would
>> sure beat having to either put them in common or copy them each time the
>> webapp
>> was refreshed.
>>
>> If it makes a difference, I'm running with 'Run modules directly from
>> workspace' turned
>> off on running JST 1.5.0v20060515, if that makes a difference.
>>
>>
>
>
Previous Topic:TCP monitor SOAP requests
Next Topic:Importing existing web project with Callisto
Goto Forum:
  


Current Time: Sat Apr 20 01:39:17 GMT 2024

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

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

Back to the top