tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pablo Millet" <>
Subject Wich is the correct approach?
Date Wed, 23 Jan 2002 09:52:11 GMT
Very, very confused...

<!-- My Context -->
<Context path="/xxx" docBase="xxx" crossContext="false" debug="0" reloadable="false"/>

My Environment Settings:

My apps. inside the WAR file:
myApp/ *.jsp AND *.HTML
myApp/WEB-INF/web.xml ( Descriptor )
myApp/WEB-INF/classes ( Empty )
myApp/WEB-INF/lib ( All my *.jar's )

Other entrys in the server.xml:
<Engine name="blaha" defaultHost="localhost" debug="0">
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">

I'm using the WAR procedure to deploy my apps. and in the first paragraph below it says that

the SysAdmins must add a Context entry to the server.xml.
If the Admin puts the War file into the webapps dir. does he have to add a Context or not
Is the Context entry in the server.xml ONLY used when deploying to other then the "webapps"

When we do put a Context, TC doesn't unpack my WAR files and I get the following entry in
my logs:

"" Error initializing resources: Document base /usr/local/jakarta-tomcat-4.0.1/webapps/XXX
does not exist
or is not a readable directory ""

When I remove the Context TC does unpack my WARs. !?

This is what is says in the manual at the following url:

" When the system administrator deploys your application into a particular 
server, he or she assigns a context path to your application "

Further down in the "Deployment With Tomcat 4" section it says:

A web application can be deployed in Tomcat by ONE of the following approaches:

1./ Copy unpacked directory hierarchy into a subdirectory in directory $CATALINA_HOME/webapps/....

2./ Copy the web application archive file into directory $CATALINA_HOME/webapps/. When 
Tomcat is started, it will automatically expand the web application archive file into 
its unpacked form, and execute the application that way...
(Says nothing about putting Contexts...)

3./ Use the Tomcat 4 "Manager" web application to deploy ...

4./ Add a <Context> entry in the $CATALINA_HOME/conf/server.xml configuration file.
approach is described briefly below, and allows you to position the document root of your

web application at some point other than the $CATALINA_HOME/webapps/ directory...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message