Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Adding Web library projects for tomcat
Adding Web library projects for tomcat [message #158317] Sun, 29 January 2006 10:23 Go to next message
Eclipse UserFriend
Can somebody please help?....

I have a "utility" standard java project, which I would like deployed (put
on the classpath), along with my dynamic web project which references it,
to the tomcat 5.5 server.

According to the help what I need is to be mark my utility project as a
web library, but this only works for WebSphere® Application Server. As
both the web application and its utility project are under development at
the same time, it would be useful to make changes to the utility project
and have them picked up by the server dynamically or at least on server
restart.

My dynamic web project lists my utility project as a project references,
but this is ignored at deployment time.

I used to use sysdeo tomcat plugin and its devloader to achieve the same
functionality.

Do I need to use a web library to achieve this and if so when will it be
available in wtp for tomcat servers?

I am using Eclipse 3.1.2 and wtp 1.0 - Thanks in advance.
Re: Adding Web library projects for tomcat [message #158345 is a reply to message #158317] Sun, 29 January 2006 16:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ifedorenko.rogers.com

Open properties of your web project, go to J2EE module dependencies
pages and toggle your utility project there.

Philip Wilkinson wrote:
> Can somebody please help?....
>
> I have a "utility" standard java project, which I would like deployed
> (put on the classpath), along with my dynamic web project which
> references it, to the tomcat 5.5 server.
> According to the help what I need is to be mark my utility project as a
> web library, but this only works for WebSphere® Application Server. As
> both the web application and its utility project are under development
> at the same time, it would be useful to make changes to the utility
> project and have them picked up by the server dynamically or at least on
> server restart.
>
> My dynamic web project lists my utility project as a project references,
> but this is ignored at deployment time.
>
> I used to use sysdeo tomcat plugin and its devloader to achieve the same
> functionality.
>
> Do I need to use a web library to achieve this and if so when will it be
> available in wtp for tomcat servers?
>
> I am using Eclipse 3.1.2 and wtp 1.0 - Thanks in advance.
>
>
>
Re: Adding Web library projects for tomcat [message #158354 is a reply to message #158345] Sun, 29 January 2006 17:53 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for responding. Selecting the utility project as a web library is
exactly what I have done and it doesnt work for tomcat.

I'm sure it isn't working because I get a java.lang.NoClassDefFoundError
for my servlet class which is derived from a class in my utility project.

Also there is no virtual jar or classes appearing in my web-inf\lib folder
when I run (deploy) the web application, as I would expect if it were
working.
The online help which tells me web library are only working for WebSphere®
Application Server is

http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. wst.webtools.doc.user/topics/twplib.html

I would like to know if this [using a web library] is the expected way to
use a dependent project in wtp.

Cheers.
Re: Adding Web library projects for tomcat [message #158360 is a reply to message #158317] Sun, 29 January 2006 18:41 Go to previous messageGo to next message
Eclipse UserFriend
Interesting....

I created a new java project. I copied all my utility classes into it and
set that up to be my web library. I now get some publishing activity and
my new utility project listed underneath the web application project in
the servers tab. Hurrah!

Unfortunately now I get:-

Error creating zip file UTILITY.jar: ZIP file must have at least one entry

and a stack trace of

java.util.zip.ZipException: ZIP file must have at least one entry
at java.util.zip.ZipOutputStream.finish(Unknown Source)
at java.util.zip.DeflaterOutputStream.close(Unknown Source)
at java.util.zip.ZipOutputStream.close(Unknown Source)
at
org.eclipse.jst.server.core.PublishUtil.createZipFile(Publis hUtil.java:368)
at
org.eclipse.jst.server.tomcat.core.internal.PublishOperation 2.publishJar(PublishOperation2.java:109)
at
org.eclipse.jst.server.tomcat.core.internal.PublishOperation 2.execute(PublishOperation2.java:52)
at
org.eclipse.wst.server.core.model.ServerBehaviourDelegate.pe rformTasks(ServerBehaviourDelegate.java:787)
at
org.eclipse.wst.server.core.model.ServerBehaviourDelegate.pu blish(ServerBehaviourDelegate.java:576)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server .java:799)
at org.eclipse.wst.server.core.internal.Server.publish(Server.j ava:788)
at
org.eclipse.wst.server.core.internal.PublishServerJob.run(Pu blishServerJob.java:145)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

So now I have a new problem to solve. Why doesnt it publish all the class
files from my new utility project? It all compiles, I've exported to a
jar with no problems.
Re: Adding Web library projects for tomcat [message #158897 is a reply to message #158360] Fri, 03 February 2006 09:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tiller.lau.mlu.lsa-net.de

Hallo, I also tried all that with the same results. I think, the Web Tool
so far promises the handling of dependent projects, but in WTP 1.0 these
things are not realised in the right way. With WTP 0.7 it all worked well.
Re: Adding Web library projects for tomcat [message #158955 is a reply to message #158897] Fri, 03 February 2006 17:50 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for trying. I was beginning to wonder if it was only me who had
problems deploying a web application with its dependent projects.

I've given up with wtp for the time being and I am now using MyEclipse
plugins (http://www.myeclipseide.com). MyEclipse published my web app
along with its dependent projects with no fuss or complaint. It just
worked the way I expected it too. I have to say Im very impressed with
MyEclipse, and as soon as my trial period expires I'll happily be spending
the $31.50 for a one year subscription.
Re: Adding Web library projects for tomcat [message #158971 is a reply to message #158955] Fri, 03 February 2006 18:55 Go to previous messageGo to next message
Eclipse UserFriend
Philip Wilkinson wrote:
> Thanks for trying. I was beginning to wonder if it was only me who had
> problems deploying a web application with its dependent projects.
> I've given up with wtp for the time being and I am now using MyEclipse
> plugins (http://www.myeclipseide.com). MyEclipse published my web app
> along with its dependent projects with no fuss or complaint. It just
> worked the way I expected it too. I have to say Im very impressed with
> MyEclipse, and as soon as my trial period expires I'll happily be
> spending the $31.50 for a one year subscription.
>
I had the same problem and followed the instructions earlier in the
thread, i.e., set the project(s) up as J2EE module dependencies and it
all worked great. i am using the released maintenance build
M200602010238, so maybe this is why.

right now i am trying to figure out how to debug classes in the
dependencies. if anyone can suggest how to do that let me know.

thanks, Mitchell
Re: Adding Web library projects for tomcat [message #158979 is a reply to message #158971] Fri, 03 February 2006 19:07 Go to previous messageGo to next message
Eclipse UserFriend
mitchell ackerman wrote:
> Philip Wilkinson wrote:
>
>> Thanks for trying. I was beginning to wonder if it was only me who had
>> problems deploying a web application with its dependent projects.
>> I've given up with wtp for the time being and I am now using MyEclipse
>> plugins (http://www.myeclipseide.com). MyEclipse published my web app
>> along with its dependent projects with no fuss or complaint. It just
>> worked the way I expected it too. I have to say Im very impressed with
>> MyEclipse, and as soon as my trial period expires I'll happily be
>> spending the $31.50 for a one year subscription.
>>
> I had the same problem and followed the instructions earlier in the
> thread, i.e., set the project(s) up as J2EE module dependencies and it
> all worked great. i am using the released maintenance build
> M200602010238, so maybe this is why.
>
> right now i am trying to figure out how to debug classes in the
> dependencies. if anyone can suggest how to do that let me know.
>
> thanks, Mitchell
easy - just use the Edit Source Lookup Path... button and add the
required projects.
Re: Adding Web library projects for tomcat [message #159486 is a reply to message #158971] Tue, 07 February 2006 16:36 Go to previous messageGo to next message
Eclipse UserFriend
I've tried M200602010238 also now but with no luck. In fact
New\Project\Web only lists Static web project. Theres no option to create
a Dynamic Web Project. Also I checked the about, plugins to see if the wtp
feature\plugin was there and the wtp icon is a little red box - it looks
wrong...thats not right is it?

I downloaded and installed into a blank directory the following files in
the following order as listed in
http://download.eclipse.org/webtools/downloads/drops/M-M2006 02010238-200602010238/,
and used winzip overwriting any existing files.

1. eclipse-SDK-3.1.2-win32.zip from
http://download.eclipse.org/eclipse/downloads/drops/R-3.1.2- 200601181600/download.php?dropFile=eclipse-SDK-3.1.2-win32.z ip
2. emf-sdo-xsd-SDK-2.1.2.zip from
http://download.eclipse.org/tools/emf/downloads/drops/2.1.2/ R200601191349/emf-sdo-xsd-SDK-2.1.2.zip
3. GEF-SDK-3.1.1.zip from
http://download.eclipse.org/tools/gef/downloads/drops/R-3.1. 1-200509301327/GEF-SDK-3.1.1.zip
4. JEM-SDK-1.1.0.1.zip from
http://download.eclipse.org/tools/ve/downloads/drops/R-1.1.0 .1-200509071822/JEM-SDK-1.1.0.1.zip
5. wtp-sdk-M200602010238.zip from
http://www.eclipse.org/downloads/download.php?file=/webtools /downloads/drops/M-M200602010238-200602010238/wtp-sdk-M20060 2010238.zip

I'm running w2k professional, got 1Gb memory, lots of HD space, and no
ideas why it doesnt work! MyEclipse still working perfectly :)
Re: Adding Web library projects for tomcat [message #160239 is a reply to message #159486] Fri, 10 February 2006 14:19 Go to previous messageGo to next message
Eclipse UserFriend
Philip Wilkinson wrote:
> I've tried M200602010238 also now but with no luck. In fact
> New\Project\Web only lists Static web project. Theres no option to
> create a Dynamic Web Project. Also I checked the about, plugins to see
> if the wtp feature\plugin was there and the wtp icon is a little red box
> - it looks wrong...thats not right is it?
>
> I downloaded and installed into a blank directory the following files in
> the following order as listed in
> http://download.eclipse.org/webtools/downloads/drops/M-M2006 02010238-200602010238/,
> and used winzip overwriting any existing files.
>
> 1. eclipse-SDK-3.1.2-win32.zip from
> http://download.eclipse.org/eclipse/downloads/drops/R-3.1.2- 200601181600/download.php?dropFile=eclipse-SDK-3.1.2-win32.z ip
>
> 2. emf-sdo-xsd-SDK-2.1.2.zip from
> http://download.eclipse.org/tools/emf/downloads/drops/2.1.2/ R200601191349/emf-sdo-xsd-SDK-2.1.2.zip
>
> 3. GEF-SDK-3.1.1.zip from
> http://download.eclipse.org/tools/gef/downloads/drops/R-3.1. 1-200509301327/GEF-SDK-3.1.1.zip
>
> 4. JEM-SDK-1.1.0.1.zip from
> http://download.eclipse.org/tools/ve/downloads/drops/R-1.1.0 .1-200509071822/JEM-SDK-1.1.0.1.zip
>
> 5. wtp-sdk-M200602010238.zip from
> http://www.eclipse.org/downloads/download.php?file=/webtools /downloads/drops/M-M200602010238-200602010238/wtp-sdk-M20060 2010238.zip
>
>
> I'm running w2k professional, got 1Gb memory, lots of HD space, and no
> ideas why it doesnt work! MyEclipse still working perfectly :)

That's very strange--trying the same thing myself ended up with both
the static and Dynamic Web Project wizards showing up. Were you
reusing an existing workspace? Have you tried unzipping it all with
a different zip tool? Did all of the included "eclipse" folders
line up properly?

Also, the red icon is normal for now as WTP hasn't chosen a logo.
There's a contest underway to do so at
http://www.eclipse.org/webtools/wtplogocontest.php.

--
- Nitin
Re: Adding Web library projects for tomcat [message #160399 is a reply to message #160239] Sun, 12 February 2006 15:35 Go to previous message
Eclipse UserFriend
Thanks, I've tried it all again from scratch and now I have the Dynamic
Web Project option with wtp-sdk-M200602010238.zip.
I must have missed one archive or got it in the wrong order or something
silly.

But the good news is that I've tried the lastest M2 release build
wtp-sdk-M200602071839.zip and My dynamic web modules now work! So Im very
happy. A big thank you to the WTP team!

I would like to point out again that the documentation is
missleading\wrong\out-of-date at
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. wst.webtools.doc.user/topics/twplib.html

where it says:-

"Currently, Web Library projects are supported only when testing in the
WebSphere test environment or remotely publishing to a WebSphere®
Application Server. After these associations are made, you must restart
and republish the server for the changes to take effect"

because now with this latest M2 release I can get a web library project
published to tomcat 5.5.

Thanks again.
Previous Topic:Webtools 1.0 running on Kanotix/Debian
Next Topic:Contributing new server definitions by server vendor
Goto Forum:
  


Current Time: Fri Mar 21 23:28:06 EDT 2025

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

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

Back to the top