|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Asset
An Asset is any kind of resource that can be exposed to the client web browser. Although quite often an Asset is a resource in a web application's context folder, within Tapestry, Assets may also be resources on the classpath (i.e., packaged inside JARs).
An Asset's toString() will return the URL for the resource (the same value astoClientURL()
).
Release 5.1.0.0 introduced Asset2
, which extends this interface with an additional
method.
AssetPathConverter
Method Summary | |
---|---|
Resource |
getResource()
Returns the underlying Resource for the Asset. |
String |
toClientURL()
Returns a URL that can be passed, unchanged, to the client in order for it to access the resource. |
Method Detail |
---|
String toClientURL()
toString()
.
Tapestry's built-in asset types (context and classpath) always incorporate a version number as part of the path,
and alternate implementations are encouraged to do so as well. In addition, Tapestry ensures that context and
classpath assets have a far-future expires header (to ensure aggressive caching by the client).
Resource getResource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |