tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandros Kotsiras" <kotsi...@mediaondemand.com>
Subject RE: Can i start/stop Tomcat from a remote computer ? ?
Date Tue, 25 Jul 2000 23:42:08 GMT
Problem Solved.
I finally wrote a small Java Application that enables me to start/stop
Tomcat on a remote computer.
Actually it was not really dificult with use of Java sockets (OK ..let's
forget firewalls for now).
It has a lightweight server-side part (approx 4MB) that has to be running
which opens a ServerSocket and blocks on a designated port listening for
client requests.
The client side part opens a socket to the server hostname/port and either
writes "start" or "stop".
When the server-socket receives the String "start" it executes the
TOMCAT_HOME\bin\startup.bat script , when it receives "stop" it executes the
"shutdown.bat".
Of course it needs JAVA at the client side but i guess that it can easily be
modified into an applet.
A nice feature of this approach is that you have the System.out.println() of
you servlets/JSP printing on the client-side DOS console the one from which
you started Tomcat which is valuable during development.
Source is available for improvements.

Alex.

-----Original Message-----
From: Hoi Fai Leung [mailto:chmikeangel@usa.net]
Sent: Tuesday, July 25, 2000 5:32 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: Can i start/stop Tomcat from a remote computer ? ?


I don't understand the command below (I don't know much about dos commands),
but is there places I can go to learn about dos commands and MMC?

Thanks,
Hoi


"David M. Holmes" <david_m_holmes@yahoo.com> wrote:
> I believe you could have the runtime do what shutdown.bat does (java
%TOMCAT_OPTS%
> -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3
%4 %5 %6 %7 %8 %9). I
> have tomcat running as a service and use the MMC to start/stop/cycle the
service remotely.
>
> --- Alexandros Kotsiras <kotsiras@mediaondemand.com> wrote:
> >
> >     I was wondering if this is possible in a Windows environment within
the
> > same Network.
> >     Can i use something like RMI to start/stop Tomcat on a remote WinNT
> > server from my WorkStation ? ?
> >     For example JRun has a WEB based interface that enables to
Start/Stop
> > the default server by having an Admin Server running.
> >      In my case i do not want to have a separate Tomcat Admin instance
> > because i don't need to start/stop it via HTTP.
> >      I would rather have a client Java Application to do that...
> >
> >     I am currently playing with the Runtime class and i tried
> >
> >     Runtime r = Runtime.getRuntime();
> >     try{
> >         r.exec("C:\\usr\\local\\tomcat-3.1\\bin\\startup.bat");
> >     }
> >     catch(IOException ex) {
> >         ex.printStackTrace();
> >     }
> >   }
> >
> >
> >   but it does not do anything  interesting ....
> >
> >   Any ideas ? ?
> >
> >
> >
> > 10
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail  Free email you can access from anywhere!
> http://mail.yahoo.com/


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1


Mime
View raw message