To generate a link, you need a request… so I suggest you do one of the
following

1. Use cron and wget to hit your app via a http request instead of a
@Startup job inside your app
2. Generate the link at some point in time when you have a
HTTPServletRequest and save it for later
3. Use a @Symbol for the base URL and generate the link yourself

NB. I started a project where you could render tapestry-templates offline
but never finished or tested it… it's nearly done

https://github.com/uklance/tapestry-offline

The idea was to generate a fake request where half the request was sourced
from an overridable global service and the other half was a runtime value.

https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/OfflineComponentRenderer.java
https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/OfflineRequestGlobals.java
https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/OfflineRequestContext.java

If there's enough interest in this… I'll resurrect the project and finish
it off.

Reply via email to