• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Start/Shutdown Tomcat Remotely?

 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to execute the start and shutdown batch files remotely from a local machine (Client: Win2k, Server: Windows Server 2003)? It seems like a simple thing to do, but I cannot find a way to do it in Windows.

Or will I need to build a little socket-based client-server application so a client can send the server a message to execute certain batch files?

Thanks,
Kashif.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could do it with a WSF. Windows Script Host allows remote procedure calls. Check out MSDN and the WSHController object.
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found another useful way to accomplish this. If you have installed Tomcat as a Windows service, then you can easily call that service from a remote pc. This way you will not have to run startup.bat and shutdown.bat. If you did not install Tomcat as a service, uninstall it and then go download it from the Apache site again. Then you can choose the option to install it as a service (you will have to download the .exe version from the Apache site).

Once it is installed as a Windows service, then you can access that service by following these steps:
1. On the remote pc, open up the 'Administrative Tools' and then navigate to 'Services'.
2. In the left hand pane, right click on 'Services'. Choose 'Connect to another computer ...'. Enter in the host pc's ip address.
3. Once you have connected you will see the list of services on the host pc. To start and stop (or restart at once), just right click on the Apache Tomcat service.

Note: You may have to enable remote service sharing on the host pc.

Let me know if you have any more questions!
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic