You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lyallex <ly...@gmail.com> on 2016/03/13 16:23:06 UTC

How to comply with http://www.sitemaps.org/protocol.html#location

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

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


Re: How to comply with http://www.sitemaps.org/protocol.html#location

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to comply with http://www.sitemaps.org/protocol.html#location

Posted by Lyallex <ly...@gmail.com>.
Oh ... well ... how smart is that, works like a dream, nice one

Thanks
Lyallex

On 14 March 2016 at 10:34, Terence M. Bandoian <te...@tmbsw.com> 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
>
> -Terence Bandoian
>  http://www.tmbsw.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


How to comply with http://www.sitemaps.org/protocol.html#location

Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
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

-Terence Bandoian
  http://www.tmbsw.com/


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