Tomcat 6 server creation using eclipse IDE on ubuntu

后端 未结 17 1664
礼貌的吻别
礼貌的吻别 2020-12-22 17:37

I\'m having a problem running tomcat 6 with eclipse 3 in ubuntu.

I installed tomcat 6 on my machine and when I tested it using http://localhost:8080, it

相关标签:
17条回答
  • 2020-12-22 18:34

    You have to symlink various folders that are scattered across the file system to the desired tomcat6 main (or installation) folder.

    tsaid suggested symlinking to /usr/share/tomcat6, I rather use /var/lib/tomcat6.

    My /var/lib/tomcat6 directory (see the symlinks I've made):

    $ ls -g -o /var/lib/tomcat6
    lrwxrwxrwx 1   22 2010-07-20 18:15 bin -> /usr/share/tomcat6/bin
    drwxr-xr-x 3 4096 2010-07-20 12:22 common
    lrwxrwxrwx 1   12 2010-07-20 12:22 conf -> /etc/tomcat6
    lrwxrwxrwx 1   22 2010-07-20 18:14 lib -> /usr/share/tomcat6/lib
    lrwxrwxrwx 1   17 2010-07-20 12:22 logs -> ../../log/tomcat6
    drwxr-xr-x 3 4096 2010-07-20 12:22 server
    drwxr-xr-x 3 4096 2010-07-20 12:22 shared
    drwxrwxr-x 3 4096 2010-07-20 12:22 webapps
    lrwxrwxrwx 1   19 2010-07-20 12:22 work -> ../../cache/tomcat6
    

    Also, don't forget to give full rw permission to your configuration files, in my case in /etc/tomcat6. Since you'll also need to symlink catalina.policy from Catalina/localhost/catalina.policy, don't forget giving execute permission to those folders. You can simplify with full permission to the conf folder, but it's only advised if you're the only user of the computer.

    cd /var/lib/tomcat6/conf
    chmod -R a+xrw *
    

    Now, delete the entry in Eclipse under Window -> Preferences -> Server -> Runtime Environment and add a new server through Run on Server or anywhere else.

    0 讨论(0)
  • 2020-12-22 18:36

    I had the same problem but thanks to all your feedback I got it fixed. In summary...

    I have Ubuntu 9.04, Eclipse Galileo (java EE developers platform 3.5.1).

    I installed Tomcat as follows:

    sudo tar zxvf apache-tomcat-6.0.20.tar.gz

    sudo cp -R apache-tomcat-6.0.20 /usr/share/tomcat6

    as explained at: http://www.ubuntugeek.com/tomcat-6-installation-on-ubuntu-feisty.html

    Then I change permissions to the conf folder /usr/share/tomcat6/conf$ sudo chmod a+rw *

    I removed it from Windows->Preferences->Server->Runtime Environment (but I don't think this step was necessary after all)

    Voila!

    0 讨论(0)
  • 2020-12-22 18:36

    Not sure, but maybe your version of Eclipse does not support the latest Tomcat version? Try to update Eclipse. I have Eclipse 3.4 and there's no problem.

    0 讨论(0)
  • 2020-12-22 18:37

    I had the same problem, but with tomcat 5.5. Changing the permissions on the /etc/tomcat5.5/conf (symlink from /usr/share/tomcat5.5/conf) worked. Thanks!

    0 讨论(0)
  • 2020-12-22 18:38

    ok, so here's what worked for me: you must go to Window>Preferences

    here, go to Server>Runtime Environments

    remove the old server or add your server or change the server location...

    (in my case, this problem arised when i changed the tomcat server location)

    now you should be able to add new servers to your environment :)

    0 讨论(0)
提交回复
热议问题