Dear k.irfee,
I have tried to deploy a demo.war in my host. It's very easy to do so. Just use the Tomcat's manager application. And if you followed my setup script, the Tomcat manager application should have already been installed. All you need to do is to find out the manager's password(username is "manager").
Follow the steps and you should be successfully deploy the demo.war and see the output of "Hello, world!":
1.Check the file /var/robust/worker1/conf/tomcat-users.xml and you can see the username and password of the role "manager". (You can modify it to suit your own need.)
2.Open a browser, and go to the URL:
http://<your_server_ip>/manager/html. Tomcat will ask you to enter the username and password, use the information from step 1.
3.Go to the "WAR file to deploy" section, and click the browse button at the "Select WAR file to upload" field, choose the demo.war and then click the Deploy button.
4.Click on the /demo link.
Note:
1.Check the file /var/robust/worker1/conf/server.host,
Your <Host> should look like the following example:
<Host name="192.168.1.1" appBase="webapps/192.168.1.1"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="192.168.1.1_access_log." suffix=".txt"
pattern="combined" resolveHosts="false"/>
<Context path="" docBase="" reloadable="false" />
</Host>
2.Check the permission of /var/webapps/<your_server_ip>, it should be writable by tomcat. Use the following command to fix it.
chown -R tomcat:tomcat /var/webapps/<your_server_ip>
Reference:
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html