|Using existing Eclipse Plug-ins as part of a WTP application [message #194492]
||Wed, 13 June 2007 01:00
Originally posted by: kirby.bohling.gmail.com|
I develop Eclipse RCP applications currently using Eclipse 3.2.2 and
WTP 1.5.3. I have a large body of code packaged up as Eclipse plug-ins.
I have an interest in re-using quite a bit of this code in a web
application, and I don't really want to repackage it. I'm trying to
figure out the workflow for using WTP. I'm totally new to WTP, so maybe
I'm missing something simple.
First, I created a sample Dynamic Web Project (called SampleWeb)
that uses Apache 5.5. I then check out the source of my RCP plug-in
(org.sample.util) that requires org.sample.thirdparty plug-in (it's
actually a plug-in wrapper around a jar file). I edit the build path
using SampleWeb (Right Click) -> Properties -> Java Build Path ->
Projects, and then add my "org.sample.util" project to Projects.
That'll get stuff to compile, but when running with a servlet that
has a dependency upon classes from the plug-in I get a
ClassNotFoundException. So I edited the J2EE Module Dependency and
added the "org.sample.util" plug-in to that, and I have to add the Jar
file from "org.sample.thirdparty/thirdparty.jar" (adding the project
org.sample.thirdparty doesn't include the thirdparty.jar even if the
org.sample.thirdparty exports the thirdparty.jar, which I find to be a
pain). I'm not sure the third party library has anything to do with it,
but I thought it might be part of the problem.
Once I get all that figured out, I then end up with an error when
attempting to start the server in this configuration:
The title of the dialog is: "Publishing to Tomcat v5.5 Server @
localhost". The body of the error is: "Error creating zip file
org.sample.util.jar duplicate entry: META-INF/MANIFEST.MF".
Am I doing something simple wrong? Is there an easy way to deal
with this? It sure seems like lots of folks doing RCP development would
want to leverage existing code as-is in a Web client. I sorta expected
this to be a bit easier. I understand that Eclipse RCP has a segmented
classloader, but none of my code depends or needs that. While I can
probably use the Eclipse 3.3 equinox projects to export servlets and
other things inside of an Equinox/Eclipse environment, it sure looks
like the WTP is a nicer web development platform for doing standard
Powered by FUDForum
. Page generated in 0.30266 seconds