2

I'm changing the host company of my website. With the previous host I had no problem, since I could use 'cpanel'.

The new host gave me the url to reach the tomcat manager page. I added a user with full permissions (I hope) to tomcat-users.xml and I reach the page you can see in the pic.enter image description here

Now, supposing my site is called 'mySite', where should I upload the .war file? Inside which folder?

I suppose I should create a folder called 'mysite', but I don't know how to do it.

Thank you

MDP
  • 4,177
  • 21
  • 63
  • 119
  • http://stackoverflow.com/questions/5328518/deploying-my-application-at-the-root-in-tomcat Are looking for this answer? – thegeko Oct 04 '15 at 08:24

4 Answers4

2

You can use this interface to deploy a new *.war from your pc to the server by pressing on 'choose file' then press 'deploy'. the xxx.war file will be uploaded to tomcat/web-apps/xxx .

After successfull deployment you will see your webapp here : enter image description here

chenchuk
  • 5,324
  • 4
  • 34
  • 41
  • I uploaded the file usng choose file. Then I pressed the start button related to my .war file, and I got this error: FAIL - Application at context path /mysite could not be started – MDP Oct 04 '15 at 08:32
2

The general procedure is:

  • find the TOMCAT_HOME directory. Since you've found tomcat-users.xml, I'm guessing yo've found it

  • under TOMCAT_HOME there will be a directory called webapps. This is where you put your WAR file.

  • a few seconds after placing your WAR file, Tomcat will unpack and deploy it. You'll se a directory appear with the same name as your WAR file but without the .war extension. At this point the application should also appear in the Tomcat manager

  • You can take a look at the TOMCAT_HOME/logs/catalina.out file if the WAR file isn't deployed a you expected.

  • Caveat: if your conf/Catalina/localhost directory isn't empty (contains an .xml file for your web app) Tomcat might not unpack and deploy your .WAR file. I've had problems with this in the past.

Frans
  • 3,670
  • 1
  • 31
  • 29
1

Just add your war into the webapps folder of your tomcat server.

pathtoyourtomcat/webapps/

caseTest
  • 11
  • 3
0

Did you try uploading the War from the WAR file to deploy section? Or do you really need to deploy by dropping the file? As for where to drop the war file on the server it depends on the server configuration

triadiktyo
  • 479
  • 2
  • 9
  • I uploaded the file using choose file button. The war file was put in the same directory of 'docs', 'examples' etc, as you can see in the pic. If I pressed the start button related to my .war file, and I got this error: FAIL - Application at context path /mysite could not be started – MDP Oct 04 '15 at 08:36