Home » tapestry-src-5.0.19 » org.apache.tapestry5 » [javadoc | source]
public interface: Asset [javadoc | source] 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 as #toClientURL() ).
Method from org.apache.tapestry5.Asset Summary:
getResource,   toClientURL
Method from org.apache.tapestry5.Asset Detail:
 public Resource getResource()
    Returns the underlying Resource for the Asset.
 public String toClientURL()
    Returns a URL that can be passed, unchanged, to the client in order for it to access the resource. The same value is returned from toString().

    Note that the returned value may be {@linkplain SymbolConstants#FORCE_ABSOLUTE_URIS request dependent}. You may cache instances of Asset, but do not cache the client URL path as it may change.