You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/03/12 04:37:45 UTC

RE: [Tapestry-developer] Assets (private for dev / external for production)

private assets are assets on the classpath.  This is only used when a
component, distributed in a JAR, includes images (or other assets).
Example:  Palette component includes images for the various buttons.
 
At runtime, the private assets may be "exposed" to the client in two ways:
1) Download via asset service
2) Copied externally
 
 
Copying externally means that the individual files are extracted, as needed,
and stored in a directory.  Tapestry builds a URL to that file.  A pair of
configuation values govern this.  It is documented.
 
Option #2 is more effecient since the asset, once copied, will be a static
asset, something that web servers can provide with blinding speed.
 
Neither solution is perfect, and may be somewhat changed in 2.4.
 
The asset service doesn't validate; it will download anything (including
.class files) that is in the classpath.
 
Option #2 has issues in a cluster, since there's no guarantee that the
desired file is available on all servers within the cluster.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



-----Original Message-----
From: tapestry-developer-admin@lists.sourceforge.net
[mailto:tapestry-developer-admin@lists.sourceforge.net] On Behalf Of Joel
Trunick
Sent: Thursday, February 20, 2003 12:18 PM
To: 'tapestry-developer@lists.sourceforge.net'
Subject: [Tapestry-developer] Assets (private for dev / external for
production)





How do I specify assets so that they are private (or contextual) in
development, but external in production? The documentation seems to imply
that this is configurable somewhere, but I'm missing where this happens. I
also want to put "https:" in front of images for secure pages, so we don't
get that IE error message (some elements are secures / others aren't
message).

If I could pass the name of the resource into some method I could "wrap it"
appropriately I suppose, but I'm missing how this is done.

Joel