tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ensing, Marco" <Marco.Ens...@ca.com>
Subject RE: VAJ and Tomcat 3.2
Date Wed, 06 Dec 2000 19:04:43 GMT
Here are my settings. Maybe this helps.

Run properties \ Program :: set tomcat home variable
 tomcat.home=d:\Tomcat

Run properties \ classpath
 d:\Tomcat\_classes\jasper.jar;
 d:\Tomcat\_classes\servlet.jar;
 d:\Tomcat\_classes\webserver.jar;
 d:\Tomcat\_classes\ant.jar;
 d:\Tomcat\_classes\xml.jar;
 d:\Tomcat\;
 d:\Tomcat\conf\;
 d:\Tomcat\webapps\;
 d:\Tomcat\webapps\examples\jsp\;


public class StartMyTomcat {
   public static void main(java.lang.String[] args) {
	  try {
		 Class aClass =
Class.forName("org.apache.tomcat.startup.Tomcat");
		 java.lang.reflect.Method method = null;
		 Class[] argsClass = new Class[] {String[].class};
		 // get the main method for the
org.apache.tomcat.shell.Startup class
		 method = aClass.getMethod("main", argsClass);
		 Object object = null;
		 Object[] arguments = new Object[] {new String[] {}};
		 // now invoke the main method for the
org.apache.tomcat.shell.Startup class
		 method.invoke(object, arguments);
	  }
	  catch (Exception e) {
		 System.out.println("Exception occurred: " +
e.getMessage());
		 e.printStackTrace();
	  }
   }                
}

public class StopMyTomcat {
   public static void main(java.lang.String[] args) {
	  try {
		 Class aClass =
Class.forName("org.apache.tomcat.startup.Tomcat");
		 java.lang.reflect.Method method = null;
		 Class[] argsClass = new Class[] {String[].class};
		 // get the main method for the
org.apache.tomcat.shell.Shutdown class
		 method = aClass.getMethod("stopTomcat", argsClass);
		 Object object = null;
		 Object[] arguments = new Object[] {new String[] {}};
		 // now invoke the main method for the
org.apache.tomcat.shell.Shutdown class
		 method.invoke(object, arguments);
	  }
	  catch (Exception e) {
		 System.out.println("Exception occurred: " +
e.getMessage());
		 e.printStackTrace();
	  }
   }               
}

-----Original Message-----
From: AC [mailto:smda@lisea.com]
Sent: Wednesday, December 06, 2000 1:47 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: VAJ and Tomcat 3.2


At the IBM site you can find 2 classes to start and stop tomcat inside VAJ. 
If you can't find it I can send it to you directly

andrea


At 09.42 06/12/2000 +0100, you wrote:


>-----Message d'origine-----
>De : Rick Goeltz [mailto:goeltzrt@ornl.gov]
>Envoyé : mardi 5 décembre 2000 19:07
>À : tomcat-user@jakarta.apache.org
>Objet : Re: VAJ and Tomcat 3.2
>
>Dear Rick,
>
>I thank you for your great help, but I have some comment :
>
> > > You're correct : IVJ doesn't close sockets even if the program
performed
>an
> > > an exit().
>
> >I have not seen this (Win98/NT, VAJ 3.0.2 EA, Tomcat 3.1/3.2).
>
>As I already say, IVJ doesn't close sockets which wasn't closed by the
>program.
>Try to open a socket and next kill the thread who does the job.
>If you restart this thread, you'll get an error.
>I'm waiting for your explaination.
>
> >To run Tomcat within VAJ, the first thing I do is get Tomcat running
> >standalone.  Then, install Tomcat in VAJ.  I mention this because I have
> >Tomcat log to stdout/stderr, not a file.  Therefore, Tomcat/VAJ will log
to
>
> >the VAJ console (a good thing).  When you want to stop Tomcat, use the
> >Console's top window, select the thread, and stop/remove it.
>
>It's dirty and will this work with AJP12/13 ?
>
> >To start Tomcat/VAJ, I go to the Tomcat class in the startup package and
> >modify it's Run properties; classpath stuff, plus the -D parameter to
point
>
> >the standalone installation.
>
>OK, I see that you know how to setup VisualAge, but me and some others
>think it's more practical to have a start and a stop program
>to manage Tomcat, aspecialy to have a clean stop.
>
>
>Regards,
>
>Thibault FREY.

Mime
View raw message