-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Konstantin,

On 4/6/15 5:48 PM, Konstantin Kolinko wrote:
> 2015-04-02 14:01 GMT+03:00 Thusitha Thilina Dayaratne
> <thusit...@wso2.com>:
>> Hi,
>> 
>> I'm using embedded-tomcat 8.0.20 in my project. In that I'm
>> parsing a custom server.xml file. After the parsing CatalinaBase
>> value of the Server is set to null. Could someone tell me why
>> would be the reason? Before parsing the file it is set to the
>> correct path.
>> 
>> Here is the code segment ExtendedCatalina catalina = new
>> ExtendedCatalina();
>> 
>> Digester digester = catalina.createStartDigester(); 
>> digester.push(this); /* Here this refers to an instance of the 
>> extended Tomcat class*/ digester.parse(inputStream); /*After this
>> line get executed getServer().getCatalinaBase() is null */
>> 
>> class ExtendedCatalina extends Catalina { @Override public
>> Digester createStartDigester() { return
>> super.createStartDigester(); } }
>> 
> 
> You have not called the setter method for that property 
> (StandardServer.setCatalinaHome(),
> StandardServer.setCatalinaBase()).
> 
> E.g. Catalina.load() calls it.

Tomcat.getServer() will initialize catalina-home and catalina-base if
they haven't already been set.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVI9rdAAoJEBzwKT+lPKRYwygP/jfxakLRufkt1Lo/Ulj77zl0
xwOA6mALLMKfliuUwvmfdShkrSoqona2re/bJ6KcUSvHA92VOckno4xaul6Lh9P4
VFQrGzEdjoCPcZrx/N80ppdZwqakV3b9vVpexZb2834aPNFQuZ3/Ms0XVXwiKudR
WYTpY3JD+hyOY2bUsh//S3OZbvx86LTJvsLvXyfjGp6NbLiJyoqVp/OVTMLdEQYW
p6ZZQIBT0apCSJRWdEAyw4xtw0Tq6yOPYFPWYyoPFFJKBFgA1UGAOxkzHPfBr1L4
g0Cp9j5ay8Ek33DKY9O/Pi+De9706JsqoLjB0v7yC/pkcMvEAVIDKcjF8fLoECa3
itC11yqY7FQGzpuHQpXJm5xt1ddXYWxgAx9pKOEu4Du2MW26I9irfS2S6eYp2mm+
31J4Lw0FlebPA/i32vtE3A+16AHvyvjHN2OxeKi++4MK3dmLh6agJguOteJ3FPbY
Az4A6RH+2c9c+j1i5hGn8LpwAvlpIDQsBy1nvwS8P/NJiTPrjpnhrSf7QPae9yrY
uLxI3XWfHdPLJne+S+ivpecr3CoqXJiPgzyCMUuQXF9grDXkw9e/6YodUPwZBlre
ljIWvdc3zhCwcPTBIrgsZnhfaD80417kfzKADytDBtBdVHH9Py3+5smikFyhEoPw
o0HmfL6TAdveV1yQLR9Z
=S7/i
-----END PGP SIGNATURE-----

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

Reply via email to