Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Unable to run servlet on tomcat7 from eclipse luna (ubuntu 14.04)
Unable to run servlet on tomcat7 from eclipse luna (ubuntu 14.04) [message #1693598] Sun, 26 April 2015 09:44 Go to next message
Gregory Van Vooren is currently offline Gregory Van VoorenFriend
Messages: 1
Registered: April 2015
Junior Member

I'm running into some (I guess) configuration problem preventing me from running a java servlet on an otherwise working tomcat7 under ubuntu 14.04.
I'm attempting to develop a servlet as described at

These are the steps I've undertaken so far:

installed tomcat7 + examples and ocumentation ( confirms this worked)
installed eclipse luna (jee package) throught the following steps:


downloaded the tar.gz
cd /opt/ && sudo tar -zxvf ~/Downloads/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz

create a new dynamic web project as described in the tutorial link.

In order to get past the first problem, I performed the following:

rm workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.server.tomcat.core.prefs
rm workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs

Still no luck, so performed the following:


cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat7 log
sudo chmod -R 0777 /usr/share/tomcat7/conf

This got me a bit further but led to an error I solved by adding /usr/share/tomcat7/lib/servlet.api.jar to the project's java build path

I've also added the Tomcat7 server to my project. When I now try to run the servlet on a server I get the error (basically the error I had at the very start)

Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.

An alleged solution for that problem is to copy the contents of /usr/share/tomcat7/conf to workspace/Servers/Tomcat\ v7.0\ Server but that didn't solve anything in my case.

Does anybody know how I can get this to work? For info I've included a screenshot of my project structure
Re: Unable to run servlet on tomcat7 from eclipse luna (ubuntu 14.04) [message #1693608 is a reply to message #1693598] Sun, 26 April 2015 16:54 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4000
Registered: July 2009
Senior Member

You forgot to mention the actual original problem message.

Generally speaking, if you're having to modify permissions to use something in /opt or /usr, you already have a problem. I suggest downloading a separate copy of Tomcat from Apache, unpacking it (and Eclipse) somewhere under your home directory, and using that unpacked copy of Tomcat for the Installed Runtime.

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Unable to run servlet on tomcat7 from eclipse luna (ubuntu 14.04) [message #1693609 is a reply to message #1693598] Sun, 26 April 2015 17:01 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

You've gone to a great deal of work. You're right, it should not be that
hard, but I fear you're stabbing around desperately trying to solve it.
I say this because you should not be surgically deleting anything out of
..metadata which is for Eclipse to manage. You should not have to muck
with the Server in your workspace either.

I can't help with what you've done already and I don't know the tutorial
itself. I would suggest you consider some of the ideas exposed on this
page of notes:

If you wish to contact me directly with questions, because I'm not
timely in the forum when you have questions, feel free. Also, your
questions really fall more under what's supported in the Eclipse WTP
forum rather than the newcomers' forum.

Previous Topic:Glassfish 4 on Eclipse
Next Topic:Startup error
Goto Forum:

Current Time: Thu Mar 04 01:54:11 GMT 2021

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

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

Back to the top