0

I am trying to run the following web app

http://www.metaboanalyst.ca/faces/home.xhtml

it says Copy and paste the .war file to the webapps/localhost (Tomcat) or deploy the war file via the GUI admin console (Glassfish).

but i have no idea what I must do, is there anyone who can help me to run this? I have installed the other stuff that was asked

Cœur
  • 37,241
  • 25
  • 195
  • 267
nik
  • 2,500
  • 5
  • 21
  • 48

1 Answers1

0

It should be fairly straightforward. Both GlassFish and Tomcat are web application servers that run a webapp. Here's what you can do for starters:

  • Install Tomcat on your Ubuntu machine at a location of your choice (e.g. /var/tomcat)
  • Find the webapps folder for Tomcat instance. Tomcat deploys and runs all the webapps that are copied into this folder.
  • Download MetaboAnalyst.war by clicking on the "Resources" link on the left hand side.
  • Copy the downloaded war file (war is short for web archive) to the webapps folder.
  • Start your Tomcat instance and point your browser to http://localhost:8080

You should read up further here.

GlassFish too is a web application server. It comes with various tools to deploy your application and it also has a concept similar to Tomcat's webapps folder. GlassFish calls it the autodeploy folder. You can see the instructions here to do something similar with the GlassFish server. The instructions on the page you linked to asks you to use the "GUI Admin Console" with GlassFish, but it is not required to do what you want.

Based on this app (and your confusion), I actually tried to deploy the app in both Tomcat and GlassFish. I did everything I could with Tomcat and it does not work. In GlassFish, I just went to the admin GUI and then deployed the .war file. I gave it a context root m and your app was available at http://localhot:8080/m (there is a bug in GlassFish admin console in that it tries to provide a URL that does not exist in the DNS, but that's a different story). In general, both Tomcat and GlassFish leave a lot to be desired in terms of the developer experience. Sigh.

The Application screen-shots are: enter image description here

Clicking on the "click here to start" link gives me:

enter image description here

The steps with GlassFish are:

  • Install GlassFish
  • Start the domain: asadmin start-domain.
  • The admin GUI is available at http://localhost:4848.
  • Click on Applications -> Deploy. Choose the war file on the file system.
  • Deploy and choose the context root (e.g. m).
  • Connect to http://localhost:8080/m.
Community
  • 1
  • 1
Kedar Mhaswade
  • 4,535
  • 2
  • 25
  • 34
  • can you please also show how to install the Tomcat on Ubuntu 16.04 ? – nik Mar 09 '17 at 23:53
  • See [this](https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04) – Kedar Mhaswade Mar 09 '17 at 23:54
  • Use http://apache.claz.org/tomcat/tomcat-8/v8.5.11/bin/apache-tomcat-8.5.11.tar.gz – Kedar Mhaswade Mar 10 '17 at 00:03
  • when I do all, I am in a point to open a browser and then I paste this http://server_domain_or_IP:8080 but the institute block the page. what should I do? – nik Mar 10 '17 at 00:13
  • should I get the server_domian_or_IP from my machine? if so, how to do that ? – nik Mar 10 '17 at 00:19
  • I used http://http://localhost:8080/ and I got this If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html Tomcat7 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING.txt.gz. – nik Mar 10 '17 at 14:01
  • For the user and pass, I added only this before is this correct? I really appreciate your help and I will defiently accept and like your answer – nik Mar 10 '17 at 14:17
  • Yes, that would be needed. It appears to me however that this app is not properly done. I tried deploying it (create a folder xyz inside webapps folder and then in xyz folder unjar the .war file that you downloaded). – Kedar Mhaswade Mar 10 '17 at 19:12
  • what do you suggest? should I install the other one? the problem is that I am not sure whether my Tomcat is working or not . – nik Mar 10 '17 at 19:36
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/137786/discussion-between-kedar-mhaswade-and-nik). – Kedar Mhaswade Mar 10 '17 at 19:38