You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jason Novotny <no...@aei.mpg.de> on 2005/12/19 21:24:57 UTC

TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Hi,

   Using Tomcat 5.5.12 and my servlet context fragment:

<Context path="/portal" docBase="gridsphere" debug="0" 
reloadable="false" crossContext="true">
       <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_gridsphere_log." suffix=".txt" timestamp="true"/>
</Context>

   doesn't seem to work-- I get this message in my logfile:

WARNING: A docBase 
/Users/novotny/Jakarta/tomcat-5.5.12/webapps/gridsphere ins
ide the host appBase has been specified, and will be ignored

Navigating to localhost:8080/portal gives me a 403

   This worked before, I'm wondering if this is a known bug or if there 
is now a new way to configure the web app?

   Thanks, Jason

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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Yoav Shapira <yo...@apache.org>.
Hi,

> PS: Question to the developers: I'd like to have a <Host> without
> appBase (only 1 app and outside) - is this supported?

AFAIK, no: a Host must have an appBase, explicitly or implicitly.

Yoav

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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Tino Schwarze <ti...@tisc.de>.
Hi,

On Mon, Dec 19, 2005 at 12:24:57PM -0800, Jason Novotny wrote:

>   Using Tomcat 5.5.12 and my servlet context fragment:
> 
> <Context path="/portal" docBase="gridsphere" debug="0" 
> reloadable="false" crossContext="true">
>       <Logger className="org.apache.catalina.logger.FileLogger" 
> prefix="localhost_gridsphere_log." suffix=".txt" timestamp="true"/>
> </Context>
> 
>   doesn't seem to work-- I get this message in my logfile:
> 
> WARNING: A docBase 
> /Users/novotny/Jakarta/tomcat-5.5.12/webapps/gridsphere ins
> ide the host appBase has been specified, and will be ignored
> 
> Navigating to localhost:8080/portal gives me a 403
> 
>   This worked before, I'm wondering if this is a known bug or if there 
> is now a new way to configure the web app?

Look at your <Host> tag. It's probably got an appBase="webapps"
attribute, so you are trying to configure
/Users/novotny/Jakarta/tomcat-5.5.12/webapps/gridsphere to be served as
/grindsphere and /portal which is not supported.

Either rename the grindsphere directory to portal and skip the <Context>
attribute or locate it somewhere else and specify the path in Context.

BTW: The Logger spec you gave will not work - logging has changed with
TC 5.5.

HTH!

Tino.

PS: Question to the developers: I'd like to have a <Host> without
appBase (only 1 app and outside) - is this supported?


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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Remy Maucherat <re...@apache.org>.
Jason Novotny wrote:
>    Hmm, can you tell me where this convention is defined anywhere? This 
> is not just a problem for my portal but a few others out there that have 
> presented instructions that no longer work. If say three portal projects 
> including Pluto and Jetspeed claim this is a problem can it be 
> considered a bug?

If you don't like it, you'll have to use a different container.

Rémy

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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Remy Maucherat <re...@apache.org>.
Yoav Shapira wrote:
> If they explain their desired functionality exactly, we can certainly
> discuss it further.  I still wouldn't call it a bug because it's
> functioning as designed for 5.5 (as noted previously, this is slightly
> different from 5.0).

The point was to remove redundant information to make the deployer 
reasonably robust. People can develop a new deployer (and associated 
manager webapp) with more capabilities if they want to, but I am -1 for 
touching the behavior of the current one in this area, since it will 
cause it to revert to broken 5.0.x behavior.

Rémy

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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Yoav Shapira <yo...@apache.org>.
Hi,

>     Great idea-- where can I find this method
> ServletContext.getContextName? It appears non-existent. There is a
> method ServletContext.getServletContextName()

That's the method I meant, but I'd forgotten it returns the
description and not the name.  getServletPath("") is a hack as you
noted, and also will return null if running the app from a packaged
WAR, so it's not a good idea anyways.

Why is the app name hard-coded?  Can you get around the hard-coding
with ServletContext.getResource-type calls, which run off the docBase
by default?

>     Hmm, can you tell me where this convention is defined anywhere? This
> is not just a problem for my portal but a few others out there that have
> presented instructions that no longer work.

It wouldn't be a bad idea to update the instructions for 5.5, e.g. by
taking out the Logger element, if it is present.

> If say three portal projects including Pluto and Jetspeed claim this is a problem can it be
> considered a bug?

If they explain their desired functionality exactly, we can certainly
discuss it further.  I still wouldn't call it a bug because it's
functioning as designed for 5.5 (as noted previously, this is slightly
different from 5.0).

--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
yoavs@computer.org / www.yoavshapira.com

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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Jason Novotny <no...@aei.mpg.de>.
Yoav Shapira wrote:

>Hi,
>Slight juxtaposition of your message:
>
>  
>
>>    This certainly seems a lot more limited than the way it worked in TC
>>5.0. I wonder if I need to file this as a bug or a feature enhancement.
>>If you have any ideas, I'd love to hear them.
>>    
>>
>
>  
>
>>second step that I don't want to do since some of the  web app code
>>internally uses a hardcoded gridsphere web app name).
>>    
>>
>
>Idea: Don't hard-code the app name, use ServletContext.getContextName
>as needed instead.
>
>  
>
    Great idea-- where can I find this method 
ServletContext.getContextName? It appears non-existent. There is a 
method ServletContext.getServletContextName() but that returns the 
description as defined in the web.xml and there is a 
ServletConfig.getServletName() but that returns the servlet name, I need 
a method that will give me the web application name programatically. 
Previously I've used getServletPath("") and parse out the last file 
separation character but it seems kind of hackish.

>Suggestion: Don't file this as a bug or feature enhancement, it's not
>likely to change, as many of us see this as an improvement in
>enforcement and convention over 5.0.
>
>  
>
    Hmm, can you tell me where this convention is defined anywhere? This 
is not just a problem for my portal but a few others out there that have 
presented instructions that no longer work. If say three portal projects 
including Pluto and Jetspeed claim this is a problem can it be 
considered a bug?

    Thanks, Jason

>Yoav
>
>On 12/19/05, Jason Novotny <no...@aei.mpg.de> wrote:
>  
>
>>Hi Yoav,
>>
>>    I tried the context without the Logger element and unfortunately it
>>still does not work. Based on some other responses I received it seems
>>there are only two options to modify the context of my webapp from
>>http://localhost:8080/gridsphere to http://localhost:8080/portal:
>>
>>1) copy "gridsphere.xml" containing my context fragment to "portal.xml"
>>AND rename the webapplication from "gridsphere" to "portal". (It's the
>>
>>2) Create a context like this:
>>
>><Context path="/portal" docBase="/somedir/gridsphere" debug="0"
>>reloadable="false" crossContext="true"/>
>>
>>where the web application is then moved outside of the Tomcat webapps/
>>directory. I don't want to do this either since for the same reasons as
>>1, I reference some files using the hardcoded gridsphere web app directory.
>>
>>
>>    Thanks for your time, Jason
>>
>>
>>
>>Yoav Shapira wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>
>>>
>>>      
>>>
>>>><Context path="/portal" docBase="gridsphere" debug="0"
>>>>reloadable="false" crossContext="true">
>>>>      <Logger className="org.apache.catalina.logger.FileLogger"
>>>>prefix="localhost_gridsphere_log." suffix=".txt" timestamp="true"/>
>>>></Context>
>>>>
>>>>
>>>>        
>>>>
>>>Loggers are gone and invalid in 5.5.  A similar context.xml fragment
>>>without the Logger sub-element works fine for me in 5.5.12.
>>>
>>>Yoav
>>>
>>>--
>>>Yoav Shapira
>>>System Design and Management Fellow
>>>MIT Sloan School of Management
>>>Cambridge, MA, USA
>>>yoavs@computer.org / www.yoavshapira.com
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>    
>>
>
>
>--
>Yoav Shapira
>System Design and Management Fellow
>MIT Sloan School of Management
>Cambridge, MA, USA
>yoavs@computer.org / www.yoavshapira.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>  
>


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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Yoav Shapira <yo...@apache.org>.
Hi,
Slight juxtaposition of your message:

>     This certainly seems a lot more limited than the way it worked in TC
> 5.0. I wonder if I need to file this as a bug or a feature enhancement.
> If you have any ideas, I'd love to hear them.

> second step that I don't want to do since some of the  web app code
> internally uses a hardcoded gridsphere web app name).

Idea: Don't hard-code the app name, use ServletContext.getContextName
as needed instead.

Suggestion: Don't file this as a bug or feature enhancement, it's not
likely to change, as many of us see this as an improvement in
enforcement and convention over 5.0.

Yoav

On 12/19/05, Jason Novotny <no...@aei.mpg.de> wrote:
>
> Hi Yoav,
>
>     I tried the context without the Logger element and unfortunately it
> still does not work. Based on some other responses I received it seems
> there are only two options to modify the context of my webapp from
> http://localhost:8080/gridsphere to http://localhost:8080/portal:
>
> 1) copy "gridsphere.xml" containing my context fragment to "portal.xml"
> AND rename the webapplication from "gridsphere" to "portal". (It's the
>
> 2) Create a context like this:
>
> <Context path="/portal" docBase="/somedir/gridsphere" debug="0"
> reloadable="false" crossContext="true"/>
>
> where the web application is then moved outside of the Tomcat webapps/
> directory. I don't want to do this either since for the same reasons as
> 1, I reference some files using the hardcoded gridsphere web app directory.
>
>
>     Thanks for your time, Jason
>
>
>
> Yoav Shapira wrote:
>
> >Hi,
> >
> >
> >
> >><Context path="/portal" docBase="gridsphere" debug="0"
> >>reloadable="false" crossContext="true">
> >>       <Logger className="org.apache.catalina.logger.FileLogger"
> >>prefix="localhost_gridsphere_log." suffix=".txt" timestamp="true"/>
> >></Context>
> >>
> >>
> >
> >Loggers are gone and invalid in 5.5.  A similar context.xml fragment
> >without the Logger sub-element works fine for me in 5.5.12.
> >
> >Yoav
> >
> >--
> >Yoav Shapira
> >System Design and Management Fellow
> >MIT Sloan School of Management
> >Cambridge, MA, USA
> >yoavs@computer.org / www.yoavshapira.com
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: dev-help@tomcat.apache.org
> >
> >
> >
> >
>
>


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
yoavs@computer.org / www.yoavshapira.com

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


Re: TC 5.5.12 WARNING: A docBase XXX inside the host appBase has been specified, and will be ignored

Posted by Yoav Shapira <yo...@apache.org>.
Hi,

> <Context path="/portal" docBase="gridsphere" debug="0"
> reloadable="false" crossContext="true">
>        <Logger className="org.apache.catalina.logger.FileLogger"
> prefix="localhost_gridsphere_log." suffix=".txt" timestamp="true"/>
> </Context>

Loggers are gone and invalid in 5.5.  A similar context.xml fragment
without the Logger sub-element works fine for me in 5.5.12.

Yoav

--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
yoavs@computer.org / www.yoavshapira.com

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