Hello all,

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
-Nifty MarkupFilter reads initial markup and creates some SharedResources
(for a variety of image states based on the filename in the markup)
-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.

I initially thought that I would just override SharedResources.get(), but I
don¹t think that is called when simply handling requests.  I also 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.  I assume it¹s in there someplace, though.

Any help would be appreciated.

Thanks!

Jake

Reply via email to