I'm using eclipse 3.8 and running it on ubuntu 12.10 which has apache tomcat 7. the problem is when I want to select tomcat as my server on eclipse runtime environment there is no option for selecting apache tomcat 7.
I've tested tomcat server at localhost:8080 and it works.it seems there is no problem with tomcat itself but I don't know why I cant add it to eclipse.Is there any idea to solve this problem?
edit: my eclise is not a java ee edition and I've installed java ee as a plugin.
Here's the way I did it, it keeps the system tomcat and your own personal tomcat instance separate, and you don't have to change permissions or stop the tomcat running as a service.
Install tomcat as per normal: sudo apt-get install tomcat7
Install private instance support: sudo apt-get install tomcat7-user
Create local instance in your home folder:
tomcat7-instance-create -p 10080 -c 10005 mytomcat
Note: -p sets the port number (default is 8080) and -c is the control port (default 8005), we set these so we don't compete with the main installation of tomcat running as a service. "mytomcat" can be anything you like, but it will create a directory by this name in your home.
Now use the following to make Eclipse happy:
cd mytomcat
ln -s /usr/share/tomcat7/lib
ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
ln -s /usr/share/tomcat7/bin/bootstrap.jar bin/bootstrap.jar
ln -s /usr/share/tomcat7/bin/tomcat-juli.jar bin/tomcat-juli.jar
mkdir -p common/classes;
mkdir -p server/classes;
mkdir -p shared/classes;
Now within Eclipse you can create a Tomcat v7.0 server and set the installation directory as ~/mytomcat.
Note: common, server and shared classes could be links too, but I wanted to keep the two separate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With