Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Serve modules without publishing causing classpath issue
Serve modules without publishing causing classpath issue [message #214794] Tue, 03 June 2008 20:16 Go to next message
Eclipse User
Originally posted by: jon.barnard.s1.com

I'm trying to run a dynamic web project in Server modules without
publishing mode. The web project has several jar libraries and several
utility projects. One of the utility projects is overwriting a class
definition in one of the jar files. The overwrite works just fine when I
publish the utility projects as a jar.

I did some deep debugging and I see that utility projects are at the end
of the classpath. Is there any way to configure this?
Re: Serve modules without publishing causing classpath issue [message #214822 is a reply to message #214794] Wed, 04 June 2008 11:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: mauro.molinari.cardinis.com

Jon Barnard ha scritto:
> I did some deep debugging and I see that utility projects are at the end
> of the classpath. Is there any way to configure this?

Try to have a look at the Order and Export tab in the Java Build Path
property page of your project... Maybe it can help.

Mauro.
Re: Serve modules without publishing causing classpath issue [message #214830 is a reply to message #214822] Wed, 04 June 2008 13:17 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Mauro Molinari wrote:
> Jon Barnard ha scritto:
>> I did some deep debugging and I see that utility projects are at the
>> end of the classpath. Is there any way to configure this?
>
> Try to have a look at the Order and Export tab in the Java Build Path
> property page of your project... Maybe it can help.
>
> Mauro.

I could be wrong, but I'm not sure this will help. I haven't done any
experiments to verify this, and the code isn't easy to understand
completely, so it may be worth a try.

Resources local to the web project are processed first to ensure its
Java classes, which are destined for WEB-INF/classes, appear first,
ahead of anything destined for WEB-INF/lib. This behavior is something
required by the Servlet spec. This does result in jars declared in the
web project appearing ahead of the classes appearing in utility projects.

I'm not aware of any requirement in the Servlet spec relating to the
order of jars in WEB-INF/lib. If you were to export the web project as
a war, I don't think there would be any guarantees about which classes
would override which contained in multiple jars.

However, with "Serve modules without publishing" enabled, if you made
sure the jar needs to be overridden is declared and exported in the
build path of the utility project that contains the overriding classes,
it looks like the classes in that utility project would appear ahead of
that jar. Again, this is based on inspection of the code, which I could
be misunderstanding. Give it a try, if you haven't already. If this
overriding is supposed to happen in the final webapp, you may have
additional deployment issues to resolve.

Cheers,
Larry
Previous Topic:Key binding in a multi page editor
Next Topic:Deploying project dependencies
Goto Forum:
  


Current Time: Mon Sep 22 10:19:53 GMT 2014

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

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