Not sure what you mean by 'outside the IDE'. I use Eclipse to build the app, and to start Tomcat. But once I am accessing the application from a browser it's all Tomcat. I have an A.xml file in tomcat/conf/Catalina which looks like this:
<Context path="/A" docBase="C:/projects/A/web" debug="0" reloadable="true" crossContext="true">
... which tells Tomcat to load the A application from 'C:/projects/A/web'. All of this works fine, until I access a class that references a class from B. B's classes are physically NOT in C:/projects/A/web/WEB-INF/classes, they are in C:/projects/B/web/WEB-INF/classes. Everything compiles properly in Eclipse, and as I said, I've tried exporting B's classes, making the A project dependent on B, etc. etc. All of
which works fine in Eclipse, but at the end of the day the classes from B are not copied to A, thus it craps out.
I am ok using the solution I found -- namely adding B's source directory to A. Doing this causes B's classes to 'live' inside of A, thus B's classes are generated in C:/projects/A/web/WEB-INF/classes (as well as C:/projects/B/web/WEB-INF/classes) and everything works. The only annoying thing, as I said, is that inside Eclipse it LOOKS as though B's code is part of A, even though it isn't, it's a Linked Folder. No, biggie, I can live with it, but if there is a better solution I'd rather not do it this way.
Many thanks!
Bob
----- Original Message ----
From: Jose Cornado <jose.cornado@xxxxxxxxxxxxx>
To: Eclipse JDT general developers list. <jdt-dev@xxxxxxxxxxx>
Sent: Wednesday, February 7, 2007 5:42:18 PM
Subject: Re: [jdt-dev] Project
with dependencies fails when deployed in Tomcat
A simplistic question(s):
Does it work outside the IDE?
Whose classloader is in charge of loading classes from B? Eclipse's or Tomcat's?
José Cornado
--
home:
http://www.efekctive.comblog:
http://www.efekctive.com/blogging----------------------
Everything has been said before, but since nobody listens we have to keep going back and beginning all over again.
Andre Gide