Eclipse add Tomcat 7 blank server name

108,179

Solution 1

It is a bug in Eclipse. I had exactly the same problem, also on Ubuntu with Eclipse Java EE Juno.

Here is the workaround that worked for me:

  1. Close Eclipse
  2. In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
    • org.eclipse.wst.server.core.prefs
    • org.eclipse.jst.server.tomcat.core.prefs
  3. Restart Eclipse

Source: eclipse.org Forum

Solution 2

I am running kepler in ubuntu and had the same problem getting eclipse to recognize the tomcat7 server. My path to install directory was fine and deleting/renaming the files only did not fix it either.

This is what worked for me:

run the following in terminal:

cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/    
rm org.eclipse.jst.server.tomcat.core.prefs    
rm org.eclipse.wst.server.core.prefs
cd /usr/share/tomcat7
sudo service tomcat7 stop
sudo update-rc.d tomcat7 disable
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 777 /usr/share/tomcat7/conf
sudo ln -s /var/lib/tomcat7/common common
sudo ln -s /var/lib/tomcat7/server server
sudo ln -s /var/lib/tomcat7/shared shared

restart eclipse, delete tomcat7 server. Re-add server and everything then worked.

Here is the link I used. http://linux.mjnet.eu/post/1319/tomcat-7-ubuntu-13-04-and-eclipse-kepler-problem-to-run/

Solution 3

I had a similar issue except the "Server Name" field was disabled.

Found this was due to the Apache Tomcat v7.0 runtime environment pointing to the wrong folder. This was fixed by going to Window - Preferences - Server - Runtime Environments, clicking on the runtime environment entry and clicking "Edit..." and then modifying the Tomcat installation directory.

Solution 4

I had same issue before: the server name was not appearing in server while configuring with eclipse

I tried all the solutions which are provided over here, but they didn't work for me.

I resolved it, by simply following these simple tips

Step1: Windows --> Preferences --> Server --> Run time Environments --> Add --> select the tomcat version which was unavailable before --> next --> browse the location of your server with same version

Step2: go to servers and select your server version --> next --> Finish

Issue resolved!!! :)

Solution 5

I faced the same issue, and I changed the workspace to new location, and it worked. I hope this helps :)

Share:
108,179

Related videos on Youtube

tonga
Author by

tonga

Updated on June 21, 2020

Comments

  • tonga
    tonga almost 4 years

    I was trying to add Tomcat 7 in my Eclipse in Ubuntu. When I click "Add new server" in Eclipse and select "Tomcat v7.0 Server", the field "Server Name" is blank and I cannot type in anything in that textbox as shown below:

    Eclipse Add Tomcat Server

    What I did before is I deleted a Tomcat 7 server from Eclipse and I was trying to reinstall Tomcat 7. But it doesn't allow me to type anything in that textbox and I cannot proceed to the "Next" button. My environment is Ubuntu Linux and Eclipse for JavaEE.

    • Abhi
      Abhi almost 10 years
      The same issue happens in Windows 8 too, which can be resolved by deleting files as mentioned
  • ashes999
    ashes999 about 10 years
    This is the fix for Windows, too.
  • TacB0sS
    TacB0sS almost 10 years
    Good one... Works on Windows 8!
  • Alex
    Alex over 9 years
    In my case I had to delete (or even better, rename) org.eclipse.wst.jsdt.web.core.prefs too.
  • heroin
    heroin over 9 years
    Works on Ubuntu 14.10 and Eclipse 4.4.1. But strange, the bug exists in Eclipse for such a long time...
  • Kyle
    Kyle almost 9 years
    I did what you said, and I've got this: Cannot publish to the server because it is missing its runtime environment. :(
  • Alexandre L Telles
    Alexandre L Telles over 8 years
    This still happens on Eclipse Mars SR2!
  • Faisal Arkan
    Faisal Arkan over 7 years
    thanks it's still works in ubuntu 16.04 ! and this still happen in eclipse Neon.1a,,
  • bdulac
    bdulac over 7 years
    It seems to be the origin of the problem I faced: some versions of Tomcat don't provide read right on conf files to all users, Eclipse is unable to init the configurations.
  • Atul Chavan
    Atul Chavan about 7 years
    i can only see projects in workspace directory. there is no other folder with ./metadata. Its not even hidden, i did ls -lrt on the directory. But there are not other directories.
  • Ajay Sharma
    Ajay Sharma over 6 years
    thanks it solved the issue, this bug is present for Eclipse Neon as well
  • Anish Sana
    Anish Sana over 6 years
    Works for Eclipse Neon on MacOS High Sierra with Tomcat 9.0.
  • hopsinat
    hopsinat over 4 years
    Doing this in win 10 apaprently deletes your Server completely and it cannot be undone by pasting the files back in.