eclipse can not determine apache tomcat 7 on ubuntu - eclipse

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.

please be more precise in your question: did you install Tomcat and Eclipse via APT? Is your Eclipse Java EE edition, or did you install the Java EE plugin?
I will suppose you got both from Ubuntu repository and you are using Eclipse for Java EE developers.
You look to http://lackovic.wordpress.com/2012/05/31/set-up-eclipse-and-tomcat-7-on-ubuntu-12-04-to-create-java-restful-web-services-with-jersey/ and follow the how-to till step 13. For me worked flawlessly.
Before starting, you must stop the running service with sudo service tomcat7 stop. In fact, Eclipse needs to start his own instance of Tomcat, that is gonna crash if there is another Tomcat listening on 8080.
Please note that Ubuntu's Tomcat installation is a little bit different from the vanilla one: in fact, Ubuntu's maintainers decide to split up the base directory and the configuration directory, while Eclipse is going to look in the base directory for configurations.

Related

How to upgrade geoserver 2.18 bin.zip to geoserver 2.21 windows installer ( as a service)

I am trying to upgrade geoserver from version 2.18.0 bin.zip to version 2.21.1 (windows installer). If I understand correctly, then 2.18.0 uses a jetty server, and no jetty installation is required, this is provided by the geoserver.
Version 2.18 uses a jetty server, and no jetty installation is required, this is provided by the geoserver. I installed 2.21.1 using the windows installer, first specifying the default address of the data folder. Everything seems to be installed, but the service starts and immediately turns off. How to overcome it? Do I need to install Tomcat first? Do I need to remove the jetty server, if so, how? In the installation of the log - only 3 lines:
ERROR : Nothing to start, exiting ...
Usage: java -jar $JETTY_HOME/start.jar [options] [properties]
[configs] java -jar $JETTY_HOME/start.jar --help # for more
information
Why is the jetty server listed in the log and not the tomcat?
Thank you very much, all works!
So to upgrade geoserver from 2.18 bin.zip to geoserver as service :
Install Tomcat as a service
download Web Archive (instead of Platform independent binary and not windows installer)
Unpack downloaded archive and copy geoserver.war to webapps directory of Tomcate (in my case C:\Program Files\Apache Software Foundation\Tomcat
8.5\webapps)
Restart Tomcate service
In webapps folder of Tomcat will appear directory
geoserver
Store your saved geoserver data folder to geoserver/data directory of Tomcate
restart Tomcat and enjoy

How to configure JBoss 5.1.0GA using JDK1.6 on Eclipse 2018-12 and Fedora 29?

I'm trying to configure JBoss AS Server on Eclipse 2018-12, but I can not create a server Jboss 5.1.0.GA using Jboss Tools 4.9.0.Final. The Error message is: 'This server requires an execution environment from J2SE-1.4 through JavaSE-1.8, but no valid JRE was found. Caution is advised.'
Error Message - Add Server
Even Though I have changed the Execution Environment, I can not find a compatible JRE Execution (JDK 1.6) for the Environment Execution.
Compatible JRE Execution
Previously I have configured the Installed JRE with a JDK 6.0, but I have noticed that some jars files are not present at moment of config, that are:
jre/lib/resources.jar;
jre/lib/jsse.jar;
jre/lib/jce.jar;
jre/lib/charsets.jar.
Libs not present
These jars present on oracle jdk_1.6.0_45 are visible at moment of config in the case of Ubuntu 18.04, but on Fedora 29, it is not present.
How can I configure to make possible to add JBoss server, and make it running on JDK1.6?
I tried your configuration on a F29 VM.
Here's what I did:
installed JDK1.6.0_45 (from Oracle)
installed 2018-12
launched 2018-12
installed JBoss Tools server adapters
tried to add a JBoss 5.1 but noticed it was not possible
removed Java 11 (sudo yum remove java-11-openjdk-headless)
installed Java 8 (sudo yum install java-1.8.0-openjdk-devel)
relanched 2018-12
got an error while creating the JBoss 5.1 server
noticed in the error log JDK1.6.0 is missing the libnsl.so.1)
installed libnsl (sudo yum install libnsl)
create and start server were now successful
Hope this helps

Run a deployed JBoss Fuse Integration application

I exported a Fuse Integration project as a jar file and deployed it to a remote server. Like so:
Start server for all IPs
/root/EAP-7.1.0/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
start the management cli
/root/EAP-7.1.0/bin/jboss-cli.sh --connect
deploy
deploy /home/ec2-user/fuseToolingTutorial.jar
When I access the EAP Admin platform (The console that's on port 9990 by default), I'm able to see that the file was in fact deployed, but I don't see any way to run the project.
If there's documentation on how to actually run Fuse applications deployed on EAP please let me know.
The right way is to follow the official Installation Guide:
https://access.redhat.com/documentation/en-us/red_hat_fuse/7.0/html-single/installing_on_jboss_eap/
Quick answer is you need to install the Fuse 7 on EAP installer before deploying your Fuse application jars as follows:
cd $EAP_HOME
java -jar fuse-eap-installer-7.0.0.fuse-000085-redhat-1.jar

Can't add TomCat sever in Eclipse using ubuntu

So I installed tomcat using this tutorial (instructions from 0:00 to 3:30): https://www.youtube.com/watch?v=xyd9EoO-1nk
Later I restarted my computer and now when I go into "eclipse -> Window -> Preferences -> Server -> Runtime Environments -> Add" I have here only "Basic" and "GlassFish" directories. Somebody have maybe idea how to make visible tomcat here?
I also installed tomcat using "sudo apt-get install tomcat7" but it also didn't help. But when I go into "localhost:8080" I see "It works! If you're seeing this page via a web browser...".
First part, the tomcat installation
You installed tomcat in your linux as a service. I mean your tomcat 7 is installed, start when you start your OS, and stop when you stop your OS.
You can check this by looking in /etc/init.d/, you must have a tomcat script (and you can control it by doing /etc/init.d/tomcat start|stop|restart). If you want to use this tomcat, I recommend you to
stop tomcat (as root, /etc/init.d/tomcat stop),
remove the tomcat script (as root, rm /etc/init.d/tomcat) to avoid a
tomcat start when the ubuntu boots
Locate the tomcat instance installation. find / -name tomcat
-print will print you all the directory where files named tomcat are located. Identify the tomcat root directory, which is the root
to give to eclipse.
Else you can just remove tomcat (apt-get remove tomcat7), download a tomcat release from tomcat.apache.org and untar it where you want. I prefer this method, because the tomcat installation won't have any "root" o weird user permission, more convenient when you're developing.
Second part, the eclipse configuration:
In the "Add Runtime Environment" windows, you'd have a link Download additional server adapters. If you click it (with a working network connection), eclipse will propose you to download the tomcat adapter. Install it and you'll be capable to add a new tomcat server.
If it doesn't work, I think you may reinstall your eclipse...
Hope this helps

Where is webapps in tomcat 7?

I am a erlang chicago boss developer, I have been asked to install a tomcat and deploy 2 war files to start the website.
I installed it using guide :
sudo apt-get install tomcat7
Now he has sent me some files which include menu.war and dashboard.war
Here it is referred as $TOMCAT_HOME/webapps in How do I deploy a WAR file in Tomcat?'
Can someone tell me where is my $TOMCAT_HOME directory?
$ echo $TOMCAT_HOME
Command is not displaying anything!
Thanks in advance!
Ok. Once you are done with tomcat installation using sudo apt-get install tomcat7, its for sure that it has installed somewhere in your machine say it under /opt or the path you have specified while installing.
Go to tomcat installation directory and this path has to be set as environment variable(TOMCAT_HOME). Even you leave it doesn't matter.
You can very well copy the 2 war files inside the webapps directory under tomcat folder.
EX: If you install tomcat7 under /opt, then /opt/tomcat7/webapps is place where you have to deploy the war files.