The moose likes IDEs, Version Control and other tools and the fly likes Tomcat7 not working in Eclipse (Ubuntu OS) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat7 not working in Eclipse (Ubuntu OS)" Watch "Tomcat7 not working in Eclipse (Ubuntu OS)" New topic

Tomcat7 not working in Eclipse (Ubuntu OS)

Daniel Ross

Joined: Nov 26, 2010
Posts: 10

I hope someone can help me solve this problem I'm having with the software mentioned in the subject line.

I am using Ubuntu 12.10, have installed eclipse and also tomcat 7.

tomcat7 is situated in /usr/share/tomcat7

The problem I'm having is that tomcat isn't working.

At the beginning I was getting error 404 and in eclipse I was getting prompted with the following error when starting the server:

The error lenght is longer than what is shown above but is about files/directories missing.

I solved this problem by creating a backup folder in the required directory, and copy the files it was asking for.

Now in the console I get an error about tomcat not being able to read some log file; the server starts but when I go to localhost:8080, the page is blank.

Can someone tell me how I can solve this problem?

Thank you
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17276

Your problem is almost certainly not Tomcat, it's what WTP Eclipse plugin that does a pitiful job of replicating the Tomcat run configuration rather than using the original run configuration the way the sysdeo Tomcat plugin does.

I'm moving this question to the IDEs forum, since you're more likely to find people who know how to deal with Eclipse WTP there.

An IDE is no substitute for an Intelligent Developer.
Daniel Ross

Joined: Nov 26, 2010
Posts: 10
Thank you for moving the post to the appropriate section.

I have configured tomcat in order to fix problems that come along when trying to integrate it in eclipse and use wtp.

A couple of things I did are:
-when I set a new server using the wizard option in eclipse,I went to properties of the new server that was just created and switched the location from workspace to the appropriate dir(done automatically when the button is pressed). The I went to the configuration area and changed the option to "Use Tomcat installation, takes control of tomcat installation".

However none of this has worked so far so waiting for help about any other step I could take to solve the problem.
Daniel Ross

Joined: Nov 26, 2010
Posts: 10
I have managed to make it work.

I'm going to post here what I've done so other can get some help out of it.

Apparently some folders were missing from my tomcat7 application so instead of installing it from the command line,I've unistalled it and downloaded a .gz version from the tomcat website.

After doing this, I extracted the tomcat7 folder and moved it to /usr/share/ - called it tomcat7
inside the folder, the backup folder is missing and when setting up tomca in eclipse it throughs an error because of the missing folder. To solve this I created the "backup" folder and copied all the files from the "conf" folder to the newly created one.

I set the settings in eclipse by going in the server properties>pressing "switch location" and this would change the location from "workspace" to the location of tomcat files.
Lastly, in eclipse>tomcat server in the configuration area I changed the option to "Use Tomcat installation, takes control of tomcat installation".

Also, go to the xml file tomcat-user and set manager-gui and other username and passwords(you can find the configuration online) and this will allow you to access the server-status,manager app etc.

Hope this helps
I agree. Here's the link:
subject: Tomcat7 not working in Eclipse (Ubuntu OS)
It's not a secret anymore!