You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Ockleford Paul (NHS Connecting for Health)" <pa...@nhs.net> on 2010/07/01 10:06:26 UTC

Docbase inside the host appBasehas been specified, and will be ignored

Hi,

I am using tomcat 5.5 and I have deployed a web application that is working fine, but on tomcat start up I have noticed this message. I have googled around but it seems most people see this message and their web app doesn't work, mine does however work fine.

Does anybody know why I am seeing this message?

I have an xml file called 'LabCatalogue.xml' in 'apache-tomcat-5.5.23\conf\Catalina\localhost' that looks like:

<Context crossContext="true" docBase="c:\\webapps\LabCatalogue" path="/LabCatalogue" reloadable="true" />

The web app is set to reloadable because it is currently in development.

Thanks,

Paul

********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere
For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail

********************************************************************************************************************

Re: Docbase inside the host appBasehas been specified, and will be ignored

Posted by André Warnier <aw...@ice-sa.com>.
Ockleford Paul (NHS Connecting for Health) wrote:
> Ok, so if I am just working in development and only using classes outside of a war or a jar file how should I configure the application? If I remove those mappings how would tomcat know that a request for /LabCatalogue should be matched to my code in c:\\webapps\LabCatalogue?
> 

To use another technical term, because. ;-)

More technically, because that is the default.
Here is a non-authoritative summary explanation.

Say a browser requests the URL "http://somehost.somedomain.com/somewebapp".
The first part "http://somehost.somedomain.com" just tells the browser with which host to 
make a connection, and to use the HTTP protocol for it.
Then the browser, over that connection, sends a request with the rest, like :
GET /somewebapp HTTP/1.1

When Tomcat receives a request with that URL "/somewebapp", it looks under the directory 
which is specified as the "appBase" for that <Host> (*), for either a directory named 
"somewebapp", or a .war file named "somewebapp.war".
It will do that /unless/ there is a Context element somewhere which tells it that it 
should look somewhere else.

By default also, under that directory, Tomcat is going to look for a "WEB-INF" directory, 
and under that directory, for a directory "classes" and a directory "lib", where it 
expects to find the .class and .jar files of your application, respectively.

(*) by default, there is only one <Host> named "localhost", and its webapps directory is 
the "webapps" directory under the Tomcat top installation directory.

For a more complete and correct explanation, you should read

http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
and
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

.. and the Servlet Specification.

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


RE: Docbase inside the host appBasehas been specified, and will be ignored

Posted by "Ockleford Paul (NHS Connecting for Health)" <pa...@nhs.net>.
Ok, so if I am just working in development and only using classes outside of a war or a jar file how should I configure the application? If I remove those mappings how would tomcat know that a request for /LabCatalogue should be matched to my code in c:\\webapps\LabCatalogue?

-----Original Message-----
From: Pid [mailto:pid@pidster.com]
Sent: 01 July 2010 09:21
To: Tomcat Users List
Subject: Re: Docbase inside the host appBasehas been specified, and will be ignored

On 01/07/2010 09:06, Ockleford Paul (NHS Connecting for Health) wrote:
> Hi,
>
> I am using tomcat 5.5 and I have deployed a web application that is working fine, but on tomcat start up I have noticed this message. I have googled around but it seems most people see this message and their web app doesn't work, mine does however work fine.
>
> Does anybody know why I am seeing this message?

Because your config is screwy.  To use a technical term.

> I have an xml file called 'LabCatalogue.xml' in 'apache-tomcat-5.5.23\conf\Catalina\localhost' that looks like:
>
> <Context crossContext="true" docBase="c:\\webapps\LabCatalogue"
> path="/LabCatalogue" reloadable="true" />
>
> The web app is set to reloadable because it is currently in development.

The appBase on the Host element is where Tomcat looks for apps to deploy.  Apps are either a .war or a directory (actually an exploded .war file).

For an application placed in the appBase, Tomcat will automatically determine the 'path' it will be deployed at and the 'docBase', so you don't need to specify either attribute.

You get the warning if the docBase is present and redundant.

As a rule of thumb, setting 'path' or 'docBase' is generally unnecessary
- possibly even 'a bad idea'.


p


> Thanks,
>
> Paul
>
> **********************************************************************
> **********************************************
>
> This message may contain confidential information. If you are not the
> intended recipient please inform the sender that you have received the message in error before deleting it.
> Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
> to do so is strictly prohibited and may be unlawful.
>
> Thank you for your co-operation.
>
> NHSmail is the secure email and directory service available for all
> NHS staff in England and Scotland NHSmail is approved for exchanging
> patient data and other sensitive information with NHSmail and GSI
> recipients NHSmail provides an email address for your career in the
> NHS and can be accessed anywhere For more information and to find out
> how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail
>
> **********************************************************************
> **********************************************
>



********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere
For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail

********************************************************************************************************************


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


Re: Docbase inside the host appBasehas been specified, and will be ignored

Posted by Pid <pi...@pidster.com>.
On 01/07/2010 09:06, Ockleford Paul (NHS Connecting for Health) wrote:
> Hi,
> 
> I am using tomcat 5.5 and I have deployed a web application that is working fine, but on tomcat start up I have noticed this message. I have googled around but it seems most people see this message and their web app doesn't work, mine does however work fine.
> 
> Does anybody know why I am seeing this message?

Because your config is screwy.  To use a technical term.

> I have an xml file called 'LabCatalogue.xml' in 'apache-tomcat-5.5.23\conf\Catalina\localhost' that looks like:
> 
> <Context crossContext="true" docBase="c:\\webapps\LabCatalogue" path="/LabCatalogue" reloadable="true" />
> 
> The web app is set to reloadable because it is currently in development.

The appBase on the Host element is where Tomcat looks for apps to
deploy.  Apps are either a .war or a directory (actually an exploded
.war file).

For an application placed in the appBase, Tomcat will automatically
determine the 'path' it will be deployed at and the 'docBase', so you
don't need to specify either attribute.

You get the warning if the docBase is present and redundant.

As a rule of thumb, setting 'path' or 'docBase' is generally unnecessary
- possibly even 'a bad idea'.


p


> Thanks,
> 
> Paul
> 
> ********************************************************************************************************************
> 
> This message may contain confidential information. If you are not the intended recipient please inform the
> sender that you have received the message in error before deleting it.
> Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
> to do so is strictly prohibited and may be unlawful.
> 
> Thank you for your co-operation.
> 
> NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
> NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients
> NHSmail provides an email address for your career in the NHS and can be accessed anywhere
> For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail
> 
> ********************************************************************************************************************
>