On Mon, Jan 19, 2015 at 1:26 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 19 Jan 2015 19:05:49 -0200, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>> Well that is what I'm currently doing, but the problem I'm facing is
>> the app generates millions of pages and your only allowed to have 50k
>> per sitemap.
>>
>  Not really a problem. See http://www.sitemaps.org/protocol.html, section
> Using Sitemap index files (to group multiple sitemap files).
>
>> Is there a way to get around the permission issue and write the file
>> to webapp or will I be required to have to figure out an alternate
>> approach as you suggested?
>>
>  Just write to the right folder. You were trying to write to the
> filesystem root, which wouldn't even work to get the sitemap web-accessible
> even if there was no permission problem. Make your code write the file to
> your expanded WAR root folder in Tomcat or other servlet container. This
> link, http://www.avajava.com/tutorials/lessons/how-do-i-
> get-the-location-of-my-web-application-context-in-the-file-system.html,
> should help you find the right folder.


In general, that's a bad advice. Containers are not required to expand the
WAR file at all and your files would be destroyed every time you deploy
them. I think the general accepted best practice is to pass a writable
directory root as an argument to your web application and write the files
there, for example /var/<myapp>/data. With T5, I usually supply the path
using symbol, in development environments pointing to build root and
explicitly set to an absolute path in production mode.

Kalle


>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to