wood burning stoves
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse: How to add Tomcat Library? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse: How to add Tomcat Library?" Watch "Eclipse: How to add Tomcat Library?" New topic

Eclipse: How to add Tomcat Library?

Antonio Fornie
Ranch Hand

Joined: Aug 07, 2008
Posts: 117

I had a Eclipse Dynamic Web project working fine in a machine, from wich I generated a war file with Eclipse. Now I have imported that war from another machine with an Eclipse Ganymede. I've done this other times and everything worked fine.

This time it's not working because Eclipse says it's not a Web Project and it doesn't let me add it to my Tomcat 5.5 Server as I did with so many other imported wars.

I've open the project properties and looked Libraries and Jars. In the other projects I used to have included automatically Apache Tomcat Library, but now I don't have it and I can't include it. Can anybody help me? How can I let Eclipse know it's a Web Project? How can I force Eclipse include Apache Tomcat Libraries as it does with the other projects?

Thank you very much.


I feel there must be far better ways to do what I do... that makes learning even funnier
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

De nada.

I normally define my Tomcat libraries using an Eclipse Classpath variable (under the Window->Preferences/Java menu dialog item). That allows me to re-target without modifying the project, though moving to a new Eclipse means I have to redefine it in the new Eclipse.

As far as Tomcat itself goes, that would depend on what plugin you're using to work with Tomcat inside Eclipse. With the Sysdeo plugin, I can add Tomcat projects off the Window->Preferences/Tomcat/Advanced menu dialog item.

An IDE is no substitute for an Intelligent Developer.
Antonio Fornie
Ranch Hand

Joined: Aug 07, 2008
Posts: 117
Thanks for your reply.

I'm not using any plugin, I'm using the "Ganymede" (3.4) version of Eclipse. It allows you to choose between many servers. In my case I choose Tomcat 5.5 and them I indicate the path of my Tomcat 5.5 installation.

Anytime I import a war, Eclipse knows it's a Dynamic Web project, but with the last one I've tried I have two problems:

1) It doesn't automatically import the Tomcat libraries and it doesn't let me select the Apache Tomcat libraries that Eclipse brought automatically (I didn't created them). In fact it's not a library for my project, but for Tomcat, isn't it?

2) It doesn't allow me to add my new project to my Tomcat server. It tells me there is no Tomcat project there.

Can anybody help me, please? Thanks in advice.

I agree. Here's the link: http://aspose.com/file-tools
subject: Eclipse: How to add Tomcat Library?
jQuery in Action, 3rd edition