RE: Newbie Question: conext.xml

2005-04-26 Thread Fritz Schneider
Bob,

Welcome, fellow newbie! I struggled with this one also. It turns out that
the context element for a root directory MUST be nested inside the host
element in server.xml. The relevant documentation reads:

You may define as many Context elements as you wish. Each such Context MUST
have a unique context path, which is defined by the path attribute. In
addition, you MUST define a Context with a context path equal to a
zero-length string. This Context becomes the default web application for
this virtual host, and is used to process all requests that do not match any
other Context's context path.

Fritz

-Original Message-
From: Bob Bronson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 26, 2005 12:14 PM
To: tomcat-user@jakarta.apache.org
Subject: Newbie Question: conext.xml

Hello everyone,

[snip...]
Let me explain what I want to do. I'm hoping someone could tell me 
where I'm going wrong, in a polite way. :)

I'm trying to use TC 5.5.9 on Win 2k.

I want the document base directory (the Context's docBase) for my 
default web application to be something other than ROOT. Please don't 
ask, why?, this is a simplification of a different but equivalent 
problem.

[snip...]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie Question: conext.xml

2005-04-26 Thread Bob Bronson
Hello Fritz,
Thank you for the welcome. I have comments below
- Original Message - 
From: Fritz Schneider [EMAIL PROTECTED]
To: 'Tomcat Users List' tomcat-user@jakarta.apache.org; 'Bob 
Bronson' [EMAIL PROTECTED]
Sent: Tuesday, April 26, 2005 3:22 PM
Subject: RE: Newbie Question: conext.xml


Bob,
Welcome, fellow newbie! I struggled with this one also. It turns out 
that
the context element for a root directory MUST be nested inside the 
host
element in server.xml. The relevant documentation reads:

I don't think this is right. First, here's another quote form the TC 
docs:
In addition to nesting Context elements inside a Host element, you can 
also store them... then there are 4 bullet points listed which I 
refered to in my original posting.

The TC goes on to say: Please note that for tomcat 5, unlike tomcat 
4.x, it is NOT recommended to place Context elements directly in the 
server.xml file.

So, it looks like it should NOT be in the server.xml. And, I was 
actually able to get it working without putting it in server.xml.



You may define as many Context elements as you wish. Each such 
Context MUST
have a unique context path, which is defined by the path attribute. 
In
addition, you MUST define a Context with a context path equal to a
zero-length string. This Context becomes the default web application 
for
this virtual host, and is used to process all requests that do not 
match any
other Context's context path.

yes, I knowthis quote preceeds the four bullet points. I must have 
read this a dozen times.


Fritz
-Original Message-
From: Bob Bronson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 26, 2005 12:14 PM
To: tomcat-user@jakarta.apache.org
Subject: Newbie Question: conext.xml
Hello everyone,
[snip...]
Let me explain what I want to do. I'm hoping someone could tell me
where I'm going wrong, in a polite way. :)
I'm trying to use TC 5.5.9 on Win 2k.
I want the document base directory (the Context's docBase) for 
my
default web application to be something other than ROOT. Please don't
ask, why?, this is a simplification of a different but equivalent
problem.

[snip...]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie Question: conext.xml

2005-04-26 Thread Hassan Schroeder
Fritz Schneider wrote:
Welcome, fellow newbie! I struggled with this one also. It turns out that
the context element for a root directory MUST be nested inside the host
element in server.xml. 
No, no, no. That's simply not true. I have multiple installations
of 5.5.x systems running and not one has a Context element inside
the server.xml.
The dead simplest approach is to put ROOT.xml as
  $CATALINA_HOME/conf/{engine}/{hostname}/ROOT.xml
Within that ROOT.xml file you can specify the docbase as ROOT
or WhAtTheHeyEver or any appropriate arbitrary path...
The name of the file is a Tomcat convention; the docbase *path*
you specify is entirely up to you.

-Original Message-
From: Bob Bronson [mailto:[EMAIL PROTECTED] 

I want the document base directory (the Context's docBase) for my 
default web application to be something other than ROOT. Please don't 
ask, why?, this is a simplification of a different but equivalent 
problem.

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie Question: conext.xml

2005-04-26 Thread Bob Bronson
Hassan,
I know you are 100% correct...
But using the $CATALINA_HOME/conf/{engine}/{hostname}/ROOT.xml 
approach is only one of 4 documented approaches (and the only approach 
I was able to get working).

Why don't the other three work? And why can't I name the file 
context.xml, as the documentation indicates.

- Original Message - 
From: Hassan Schroeder [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Cc: 'Bob Bronson' [EMAIL PROTECTED]
Sent: Tuesday, April 26, 2005 3:46 PM
Subject: Re: Newbie Question: conext.xml


Fritz Schneider wrote:
Welcome, fellow newbie! I struggled with this one also. It turns out 
that
the context element for a root directory MUST be nested inside the 
host
element in server.xml.
No, no, no. That's simply not true. I have multiple installations
of 5.5.x systems running and not one has a Context element inside
the server.xml.
The dead simplest approach is to put ROOT.xml as
  $CATALINA_HOME/conf/{engine}/{hostname}/ROOT.xml
Within that ROOT.xml file you can specify the docbase as ROOT
or WhAtTheHeyEver or any appropriate arbitrary path...
The name of the file is a Tomcat convention; the docbase *path*
you specify is entirely up to you.

-Original Message-
From: Bob Bronson [mailto:[EMAIL PROTECTED]

I want the document base directory (the Context's docBase) for 
my default web application to be something other than ROOT. Please 
don't ask, why?, this is a simplification of a different but 
equivalent problem.

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie Question: conext.xml

2005-04-26 Thread Hassan Schroeder
Bob Bronson wrote:
But using the $CATALINA_HOME/conf/{engine}/{hostname}/ROOT.xml 
approach is only one of 4 documented approaches (and the only approach I 
was able to get working).

Why don't the other three work? 
Well, I'm absolutely certain that this:
 4: {appbase}/{docbase}/META-INF/context.xml
:: works just fine -- I use that approach sometimes.
Both of these:
 1: $CATALINA_HOME/conf/context.xml
 2: $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default
:: I've never tried, so I'd have to fiddle around a bit. But since
the other two work fine, and to me represent the optimal approach to
managing my webapps, I'm not overly motivated :-)
As always, YMMV!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]