2011/10/28 Rajkumar Singh <rajkumar.si...@digitas.com>: > Hello, > > I am not able to read the environment variable from the server.xml - those > are also referenced in the META-INF/context.xml. > > I am using tomcat version 6.0.29. The tomcat is deployed on the OS Linux > > I am deploying my source code in some folder called > /data2/www/xyz/htdocs/approot. I have pointed the server.xml to read from > /data2/www/xyz/htdocs/approot as follows: > > <Host name="xyz.company.com"> > <Context path="/" docBase="/data2/www/xyz/htdocs/approot" > reloadable="true" debug="0" override="true" /> > </Host> > > Under the "approot" folder I have the WEB-INF and the META-INF folder. And > under the META-INF folder I have the context.xml. > > The server.xml has one environment variable as follows: > > <Environment name="serverURLPrefix" override="false" > type="java.lang.String" value="http://xyz.company.com"/> > > And in the context.xml the same variable is referenced as > > <Context path="/" reloadable="true" debug="0" override="true"> > <ResourceLink global="serverURLPrefix" name="serverURLPrefix" > type="java.lang.String"/> > </Context> > > Can please help me in understanding as to why the tomcat is not able to > read the property "serverURLPrefix"? >
This behaviour is by design. The <Context> element can be defined only once. You choose to define it in server.xml and thus context.xml file is ignored. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org