>From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
>Subject: RE: Server.xml Host Configuration
>
>Remove the <Context> element; it should never be placed in server.xml and
you don't need one.

If he wants to have an access log, he needs the <Valve> element.  The <Valve>
element was inside <Context>, <Context> was in <Host>.  If he removed the
<Context> element, <Valve> would go with it.  <Valve> can be placed inside
<Engine>, <Host>, or <Context>.  Maybe you meant to say delete "<Context>"
and "</Context>" from server.xml, placing <Valve> directly inside <Host>.

Placing <Valve> inside <Host> will log access to every web app defined for
that virtual host.  Right now he only seems to have one web app.  If there is
only one hosted web app, the access log would contain the same information
whether the <Valve> is in <Host> or <Context>.  As a matter of fact, if this
is his only <Host> element, the access log would contain the same information
if <Valve> were inside <Engine>.

It all depends on his intent.  If he wants to limit logging to a particular
web app, I would suggest placing the <Valve> inside <Context>.  It would be a
good habit to develop.  This way, if he ever decides to add another web app
to this host, and he wants a separate access log, he has a template to work
from.  Otherwise, if he wants to log all access to a virtual host, place
<Valve> inside <Host>.  If he wants to log all access to a Tomcat server
instance, place <Valve> inside <Engine>.

-Bill

-----Original Message-----
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 22, 2008 8:35 AM
To: Tomcat Users List
Subject: RE: Server.xml Host Configuration

> From: Radcliffe, William H. [mailto:[EMAIL PROTECTED]
> Subject: RE: Server.xml Host Configuration
>
> As an addendum.  If you want to remove the <Context> element but still 
> create an access log, you can create a context.xml file.

Note that the OP's AccessLogValve was inside the <Host>, not the <Context>,
and can stay where it is.  Again, no <Context> is needed for the desired
setup.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to