On 27 Dec 2011, at 13:19, Konstantin Kolinko <knst.koli...@gmail.com> wrote:
> 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" This appBase path, above... >> 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"> ... is the same as the docBase path, above and... > > <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"> ... Is the same as this docBase path here too. Is this exactly as you have it, or is it a typo? If it is accurate it is a thoroughly broken configuration and will mean that every directory in there is deployed as an application. p > > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org