aspose file tools*
The moose likes Servlets and the fly likes How do you deploy to a remote machine? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How do you deploy to a remote machine?" Watch "How do you deploy to a remote machine?" New topic
Author

How do you deploy to a remote machine?

Glenn Murray
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
Hi,

I'm working on my first Tomcat app. I discovered that I can invoke the manager locally with a browser (http://localhost:8080/manager/deploy...) to deploy, etc. However, this doesn't work for me when I try to deploy to other machines (the list and serverinfo functions work, but not deploy).

Is this supposed to work? (What I did was change "localhost" to "192.168.0.1".)

Is there a standard way to deploy to another computer? I see that there are ant tasks, but they invoke the same manager that is failing above, no?

Thanks,
Glenn


Glenn Murray
Author of Yo Soy Una Vaca De Hoy
Tom E. Cole
Greenhorn

Joined: Oct 21, 2003
Posts: 9
It depends on how the machine is setup. Is this remote machine one that you control? My Tomcat machine is somewhere else in my network, yet the Manager and Admin consoles work just fine. I also have a personal account with jsp-servlet.com, their manager works just fine over the internet as well.
Glenn Murray
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
Hi Tom,

Thanks for the reply. Right now I have a Linux box connected by a crossover cable to a WinXP box which is doing Internect Connection Sharing and hosting Tomcat. The WinXP box is connected to the internet, and out there I have another Linux box running Tomcat. I can run apps and the manager's list and serverinfo commands on both Tomcats, but the deploy does not work on either, only on localhost. As I mentioned above, the only change I made in my deploy command was the host name.

Is my deploy command syntax wrong for connecting to remote boxes? How does it compare to yours?

http://localhost:8080/manager/deploy?path=/<mycontext>&war=file:/home/glenn/<myprojectdir>/dist

I remark that I"ve never been able to get the deploy functionality to work
with .war files, only with the app unzipped, as in the example above. This
may indicate yet another thing I don't understand about deploying.

Thanks,
Glenn
[ July 21, 2005: Message edited by: Glenn Murray ]
Glenn Murray
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
Hi,

Well, live and learn. I learned today that if you point your browser at
http://<domain>:8080/manager/html that you get a web page that lets you
upload war files remotely. It can also be done using ant tasks as
described in the manager docs included with Tomcat.

Cheers,
Glenn
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How do you deploy to a remote machine?