On Tue, 10 Dec 2002, Wendy Smoak wrote:
> Date: Tue, 10 Dec 2002 09:17:34 -0700 > From: Wendy Smoak <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: "Tomcat Users List (E-mail)" <[EMAIL PROTECTED]> > Subject: Specifying <Context> tag outside of server.xml > > > I seem to remember making files named app-context.xml and putting them in > the 'conf' directory along with server.xml. Probably on 3.3.1, it was that > long ago. > > Now (on 4.1) from what I can tell from the admin webapp, it seems that I am > to make an xml file matching the name of the context and put it directly in > the webapps folder. > > Can someone point me to the documentation that gives the rules for this? I > don't want to edit server.xml if I can avoid it. > In 4.1, a "context configuration file" is pretty similar in spirit to the app-context.xml file from 3.3. You can put a <Context> element in it, as well as all the nested elements that are legal inside a <Context>. It's purpose, as you've gathered, is to avoid the need to edit server.xml directly. > Is there a way to include this xml file (with the <Context> tag) in the .war > file and have it deploy to where it belongs? Or do you just include it and > expect the person who's doing the deployment to move the file to the webapps > directory? > There are three different ways to deploy apps that use a context configuration file: * Stick the XML file itself in the webapps directory. This will auto-deploy an app with a context path based on the root part of the filename (the admin and manager webapps in a standard Tomcat 4.1.x install use this approach). * You can use the "install" command of the manager webapp, and pass a path to a context configuration file instead of to a directory or a WAR. As with other uses of "install", this works only if you're on a filesystem accessible to the Tomcat instance that is running (typically, you're on the same machine). * You can use the "deploy" command of the manager webapp to deploy a WAR file, and include a "META-INF/context.xml" file inside the WAR for the non-default characteristics. This capability can be disabled as well -- check the config docs for the <Host> element for more info. > Thanks! > > -- > Wendy Smoak > Applications Systems Analyst, Sr. > Arizona State University PA Information Resources Management > Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
