-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Terence,

On 3/14/16 6:34 AM, Terence M. Bandoian wrote:
> On 3/13/2016 10:23 AM, Lyallex wrote:
>> CentOS 5.2 jdk1.7.0_45 apache-tomcat-7.0.42 no httpd, tomcat
>> only, one webapp ROOT.war
>> 
>> According to the documentation at
>> 
>> http://www.sitemaps.org/protocol.html#location
>> 
>> An xml sitemap should appear in the context root, if it dosn't it
>> can only contain a limited set of urls.
>> 
>> Currently, whenever I add a new product for sale I auto generate 
>> sitemap.xml and write it to a remote context called sitemap
>> giving me the sitemap URL
>> 
>> www.mysite.com/sitemap/sitemap.xml which I detail in robots.txt
>> 
>> However this is apparently incorrect and sitemap.xml should live
>> at www.mysite.com/sitemap.xml. Unfortunately it is not possible
>> to write to the root of my web app on the fly so how do people
>> deal with this ?
>> 
>> Thanks Lyallex
>> 
> 
> 
> One solution might be to write a servlet mapped to /sitemap.xml
> that reads sitemap.xml from an alternate location and sends the
> contents as a response to any requests for /sitemap.xml

Or use PreResources in the ROOT webapp. No programming necessary.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlboUp8ACgkQ9CaO5/Lv0PAFqACcD4wezJtqsSpHfPIXlL6Zi43v
IK4AoLtEqPF6LBLzM6sZVl6hQeqUtgEo
=1QsM
-----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