Home > Uncategorized > Eclipse with Tomcat V7.0 in Ubuntu 11.10

Eclipse with Tomcat V7.0 in Ubuntu 11.10

I really don’t know why it is always a pain to setup tomcat with Ubuntu 11.10. I have publish since tomacat v5.0 with Debian PPC and it is always a pain.

1. Download Eclipse from the Eclipse web site. (J2EE version)
2. Download Tomcat version 7 or install it via apt-get
apt-get install tomcat7 tomcat7-admin tomcat7-common tomcat7-docs tomcat7-examples
3. Set the following configuration:

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 logs
sudo chmod -R 777 /usr/share/tomcat7/conf

3. Run eclipse
4. Add a view ( Windows -> Show View -> Other -> Server -> Servers -> OK )
5. Go to the view
6. Add a Tomcat v7 (consider /user/share/tomcat7 as your path)
7. Enjoy Tomcat 7 in Eclipse.

Troubleshoot:

 

Cannot create a server using the selected type – Eclipse tomcat

Some times if we delete the servers configuration in the workspace or if we move the workspace adding tomcat as server can become difficult thing.  We will hit with the error Cannot create a server using the selected type.

To resolve this error, try one or all of the following:

1.  Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server

2.  Rename the org.eclipse.jst.server.tomcat.core.prefs to org.eclipse.jst.server.tomcat.core.prefs.bak (or you can delete this file). This file can be found at \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings

3.  Rename the org.eclipse.wst.server.core.prefs to org.eclipse.wst.server.core.prefs.bak (or delete the file).  This file also can be found at the same location as above

 

Advertisements
  1. rbaleksandar
    May 25, 2012 at 11:41 am

    Thank you so much! The first part solved my problem in an instant. Now I’m a happy Tomcat7+Eclipse user. 😀 Btw I’m using Ubuntu 12.04 LTS and OpenJDK (the Sun JAVA packages are no longer present in the repositories), which seems to work just fine with Tomcat. ^_^

  2. Artem
    October 5, 2013 at 11:11 am

    Thanks oramirez, that’s a great instruction! Saved me a lot of time 🙂

  1. June 27, 2013 at 11:11 pm
  2. July 14, 2014 at 4:41 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: