tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: Load on Startup : Where to put class?
Date Mon, 25 Sep 2000 09:49:06 GMT
Hi,

> -----Original Message-----
> From:	Arthur Farmer [SMTP:afarmer@hyperwave.com]
> Sent:	Monday, September 25, 2000 10:02 AM
> To:	Tomcat-User-Mailinglist
> Subject:	Load on Startup : Where to put class?
> 
> Hi 
> I want to load some servlet on Tomcat startup that is responsible for
> handling all other servlets on my tomcat server. Well it does some
> initializing for my local database so that I don't need to do that extra
> for each servlet .
> Now I tried to put the right lines into the web.xml file under /conf , but
> I don't know where to put my Servletclass file.
> Which is the right location on the server (or local filesystem path) so
> Tomcat can find my class and load it?
>  
> thx
	[Kitching Simon]  
	Anywhere on your classpath will do, but the
	best place is under the yourwebapp/WEB-INF/classes
	directory.

	And as an alternative to modifying $TOMCAT_HOME/conf/web.xml, try
	putting your changes in yourwebbapp/WEB-INF/web.xml file instead.
	There are two reasons for this:
	(1) it allows you to deploy just a single directory into an existing
	tomcat installation. In fact, you can even pack your webapp
	into a ".war" file (just a jar file with a specific directory
layout).
	Installing your webapp is more difficult if you need to change files
	in tomcat's admin directory as part of an install.
	(2) It allows multiple webapps to exist inside a single tomcat
install.

	Regards,

	Simon
>  

Mime
View raw message