public interface AssetRequestHandler
Asset
to
the user agent (i.e., the client web browser). Starting in Tapestry 5.2,
asset paths are more structured, consisting of four parts:
/assets/
-- the root path for all assets
SymbolConstants.APPLICATION_VERSION
symbol
AssetDispatcher
service)
So, an example path might be /assets/1.0.1/corelib/components/select.png
. The handler id would be
corelib
, and the extra path would be components/select.png
.
AssetDispatcher
Modifier and Type | Method and Description |
---|---|
boolean |
handleAssetRequest(Request request,
Response response,
String extraPath)
Given a request targeted (via the handler id) to the specific handler, process the request.
|
boolean handleAssetRequest(Request request, Response response, String extraPath) throws IOException
Response.getOutputStream(String)
) or an error response
(via Response.sendError(int, String)
). It is the handler's responsibility to allow
for client-side caching (possibly sending an HttpServletResponse.SC_NOT_MODIFIED
response).
The handler should return true if it provided a response. If the handler returns false, this indicates that the
extra path did not identify a known asset (virtual or otherwise) and the AssetDispatcher service should send a
HttpServletResponse.SC_NOT_FOUND
response.
request
- incoming asset requestresponse
- used to send a response to clientextraPath
- additional path to identify the specific assetIOException
Copyright © 2003-2012 The Apache Software Foundation.