2011/12/27 Edwards, Dominic <dominic.edwa...@logica.com>:
>
>
> Platform Details:
> -----------------
> Tomcat 5.5.28

Old..
And 5.5.x branch as a whole is EOL in less than a year.

> Operating System: RedHat Enterprise 5
>
>
> Problem
> -------
>
> Tomcat appears to be mismanaging my web contexts after a restart. It happens 
> only sometimes and not others.
>
> I have the following context records in my server.xml:
>
> <Host name="mysite.com" appBase="/home/myaccount/public_html/mysite.com" 
> unpackWARs="true" autoDeploy="true" xmlValidation="false" 
> xmlNamespaceAware="false"
>
> deployOnStartup="true">
>         <Alias>www.mysite.com</Alias>
>
>         <Context path="" reloadable="true" 
> docBase="/home/myaccount/public_html/mysite.com" crossContext="true">

<Context> elements in server.xml are explicitly discouraged. The
recommended practice is to place them into separate XML files.

>         <context-param>
>                  <param-name>SharedSessiondataContext</param-name>
>                  <param-value>"/cms"</param-value>
>                </context-param>
>                </Context>
>
>         <Context path="/cms" reloadable="true" 
> docBase="/home/myaccount/public_html/mysite.com" crossContext="true">

If you configure a docBase explicitly, it MUST be outside of appBase.
Your configuration is broken because of it.

>         <context-param>
>                  <param-name>SharedSessiondataContext</param-name>
>                  <param-value>"/cms"</param-value>
>                </context-param>
>                </Context>
>     </Host>
>
> This represents my website and a CMS for the website, the cms being in a 
> subdirectory of the main website's root directory. Before you ask the 
> configuration was originally
>
> designed to enable the sharing of session object data between the two 
> contexts.
>
> The problem is that sometimes when Tomcat is restarted these contexts are 
> confused. At other times the restart does not encounter the problem which is 
> why the cause remains a
>
> mystery to me that I hope someone can help with.
>
>
>
> Symptoms
> --------
>
> If I visit the CMS URL
>
>>> http://www.mysite.com/cms/ (web page is /www/mysite.com/cms/index.jsp)
>
> I see the webpage I would expect to see when I visit
>
>>> http://www.mysite.com/ (web page is /www/mysite.com/index.jsp)
>
> If I visit the main URL
>
>>> http://www.mysite.com/ (web page is /www/mysite.com/index.jsp)
>
> I see the main site just as I would expect so it appears sometimes both 
> contexts are pointing to the same URL.
>
>
>
>
> Has anyone ever experienced this kind of irregular behaviour or know what 
> might be the cause? As I say this happens from time to time - sometimes and 
> not others even though
>
> Tomcat starts up with the same configuration.
>

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

Reply via email to