tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Context config - was Re: Pb with webapp admin
Date Fri, 11 Jul 2003 09:06:47 GMT
At 09:20 AM 7/11/2003 +0200, you wrote:
>Jacob Kjome wrote:
>>Put any <Context> specific stuff in a context configuration file.  See 
>>admin.xml and manager.xml in webapps for an example.  You must be using 
>>the manager app to upload a .war file since the server.xml is getting 
>>reloaded.  So, name your context configuration file "context.xml" and put 
>>it in the META-INF directory of your .war file.  Now do the upload and 
>>your context information should be there.
>
>Currently, given an application called, say "drs", I provide a file called 
>"drs.xml" that sits in webapps. This contains the <Context></Context> part

>of server.xml. Does the META-INF/context.xml file do exactly the same 
>thing? If so, which is preferred, if not, any pointers to where I can find 
>out about it?

This all depends on how you are deploying your webapp.  Do you add your 
.war file + your "drs.xml" file to the webapps directory at the same time, 
or does the .war file not exist until you upload it via the Tomcat manager 
app?  If the latter, then providing the "drs.xml" file to Tomcat in webapps 
is going to confuse the hell out of Tomcat since it doesn't exist at Tomcat 
startup and the context will be marked as bad.  When you then upload the 
war file, the "drs.xml" file will not be used to provide information for 
the .war file.  Follow my previous instructions and don't put "drs.xml" in 
webapps unless you also put drs.war there at the same time.  also, your 
docBase better be "drs.war" (or whatever the name of the .war file is) 
rather than a directory (such as "drs") since Tomcat won't expand the .war 
file if a <Context> entry is defined for a 'path' attribute matching the 
name of an existing .war file, less the .war extension.  It should be...

<Context path="/drs" docBase="drs.war"/>

That also applies for the META-INF/context.xml.  Of course you can add 
whatever else you need to the <Context/> entry, but the one I provided here 
is just the base minimum you require.

>I cant find anything in the docs about this. (I run tc 4.1.14)

This is pretty old stuff.  Why not run Tomcat-4.1.24?

Jake

>Thanks,
>Martin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message