see org.apache.wicket.extensions.Initializer for an example of how to
registered sharedresources on startup

-igor

2010/4/26 Jacob Brookover <jbrooko...@cast.org>:
> Hello all,
>
> It’s been 2 weeks with no suggestions, so I figured I would give this
> another shot.
>
> I¹m running Wicket on Google App Engine. ?Things have been going fairly
> well, but I¹ve encountered a new issue. ?GAE, at any moment, can wipe and
> restart your application. ?In doing so, you lose everything including
> anything you¹ve added to SharedResources. ?Unfortunately, this can happen in
> the middle of a page load as illustrated here:
>
> -Page request comes in
> -MarkupFilter reads initial markup and creates some SharedResources (e.g.
> For different image file states)
> -MarkupFilter sets the URL in the markup based on the URL provided by the
> mounted SharedResource (e.g. ³img/logo.png² becomes
> ³/resources/INDIRA/img/logo_d.png² because I wanted the disabled version).
> -Markup is returned to the browser
> -GAE restarts the application, losing the added SharedResource mapping
> -Browser requests the resource according to the mounted URL
> -Wicket cannot find resource, missing image
>
> My current hack idea is to add any shared resource to the GAE MemCache (URL
> maps to File). ?That works, but now, I just need to know where Wicket
> actually looks up the file so I can add a fallback to check the GAE MemCache
> if the file is not found. ?My understanding is that the mounted
> SharedResource path resolves to an actual path in the ServletContext, but I
> can¹t figure out where that is happening.
>
> SharedResources.get() is final, so I can’t override that.  I found
> references to WebRequestCodingStrategy.RESOURCES_PATH_PREFIX, but none of
> that seemed to help. ?Finally, I dove deep into WicketFilter,
> WebRequest/Response, SharedResourceRequestTarget etc but got completely
> lost and didn’t see an obvious solution.. ?I assume it¹s in there someplace,
> though.
>
> Any help would be appreciated.
>
> Thanks!
>
> Jake
>

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

Reply via email to