Home > Contents > Index >
RENDER.SATELLITEBLOB
Retrieves a blob from a table or from the Sites-Satellite cache.
Syntax
<RENDER.SATELLLITEBLOB [ASSEMBLER="uri assembler shortform"] [ASSET="asset instance name
"] [AUTHORITY="authority value"] [BLOBCOL="column name
"] [BLOBHEADER="MIMEtype
"] [BLOBKEY="primaryKeyName
"] [BLOBNOCACHE="true|false"] [BLOBTABLE="blobTable
"] [BLOBWHERE="primaryKeyValue
"] [C="asset type
"] [CACHECONTROL="expirationDateAndTime
"] [CID="asset id
"] [CONTAINER="servlet|portlet"] [CSBLOBID="session variable value"] [FIELD="asset field name
"] [FRAGMENT="fragment value"] [PARENTID="parent to log this blob as a dependency"] [SATELLITE="true|false"] [SCHEME="scheme value"] [SERVICE="HTMLtagName
"] [PREFERREDFILE="filename"] /> [<RENDER.ARGUMENT NAME="argname
" VALUE="argvalue
"/>] </RENDER.SATELLLITEBLOB>Attributes
assembler
(optional)- Short form name for uri assembler class. Specifying an assembler overrides the default assembler used by Sites to construct URLs. Omitting this value will cause URLs generated by this tag to use the assembler registered with the highest priority in the request property file.
authority
(optional, required if scheme is set)- Attribute that allows the user to specify a fully-qualified URL, when used in conjunction with
scheme
. URLs are of the formscheme://authority/path?query#fragment
. For most purposes, authority corresponds tohost:port
for the given application. Specifyingscheme
andauthority
allows for fully-qualified URLs to be created, which is useful for sites with multiple domains and in other cases.service (optional)
- Input. Start of the HTML tag to hold the reference to the blob. For example, if the blob is an image, use
service="img src"
. The default value isimg src
.blobtable (optional)
- Input. Name of the Sites table that stores assets of this type. For example,
blobtable="ImageFile"
.blobkey (required, if blobtable set)
- Input. Name of the column used as the primary key. Typically this is
id
.blobwhere (required, if blobtable set)
- Input. Object ID of the asset.
blobcol (required, if blobtable set)
- Input. Name of the column that contains the binary data. For example, for the imagefile asset type,
blobcol="urlpicture"
.blobnocache
(optional)True
orfalse
. If set totrue
, the blob and the header will not be cached on either Sites or Satellite Server. The default value isfalse
.c (required, if asset and blobtable not set)
- Input. An asset type name.
cid (required, if asset and blobtable not set)
- Input. An asset identifier.
asset (optional)
- Input. Name of an asset instance.
field (required, if blobtable not set)
- Input. The name of an asset field containing binary data to be served.
fragment
(optional)- Optional attribute to specify a fragment on the URL. Fragments, sometimes known as anchors, allow browsers to advance to a specific location in a single web page. ex.
http://www.myhost.com/foo.html#thirdParagraph
.container
(optional)- Override attribute that specifies whether the URL will be generated for a servlet container or a portlet container. By default, the current container will be used. For practical purposes, leaving this blank or setting it to
servlet
should be sufficient. Legal values areservlet
andportlet
.blobheader (required)
- Mimetype for returned data, in the form
description/extension
. For example, the mimetype for a GIF image isimage/gif
.cachecontrol (optional)
- Input. Determines for how long to cache the blob. See satellite.blob for details about this parameter.
csblobid (optional)
- Value of this parameter must correspond to a session variable of the same name when BlobServer security is on. When a request is made to the BlobServer, the
img src
service parameter sends a new request to the application server after the browser reads the containing page. BlobServer then verifies if thecsblobid
parameter was set. When BlobServer security is set to true and thecsblobid
value matches the session variable value, the blob is served. If the values do not match, a security violation is reported and no blob is served.satellite
(optional)- Override attribute that forces the URL generated to be a URL for either Satellite Server or Sites. By default, the URL will automatically be set to whatever the containing page is set to. Legal values are
true
(Satellite Server URL) andfalse
(Sites URL).parentid (optional)
- The id against which this blob should be logged as a dependency. When a blob is cached, an item dependency can be recorded against the cache key to provide a content-based identifier for accessing the cached blob, rather than requiring the cache key to do so. This is useful in cache management. When coupled with an asset identifier, this can allow blobs to be flushed when an asset is updated.
scheme
(optional, required if authority is set)- Attribute that allows the scheme to be set in the URL. The scheme in the case of most URLs refers to the protocol and is usually set to either
http
orhttps
. If this is left blank (andauthority
is left blank) then the URL will be relative to the current scheme and authority.preferredfile
(optional)- Attribute to specify a preferred filename. Only used for static publishing.
Arguments
RENDER.ARGUMENT (optional)
- Input. Name/value modifiers for the HTML tag.
Description
This tag is equivalent of Sites-Satellite satellite.blob tag, with the following exception:
rendermode
is passed in automatically.- When
asset
orc
/cid
are specified, compositional dependencies are recorded, and the blob will automatically be flushed from cache when the blob is modified.You can use the
blobheadername
andblobheadervalue
parameters to specify http headers in the BlobServer response. For example, you can specify the content-type as follows:blobheadername1="Content-Type" blobheadervalue1="image/gif"If you want to use http headers to prevent browser caching of BlobServer requests for all browsers, use both HTTP 1.0 and HTTP 1.0 cache control directives. In the following example, the first header (Cache-Control:no-cache) is the HTTP 1.1 directive and the second header (Pragma:no-cache) is the HTTP 1.0 directive.
blobheadername1="Cache-Control" blobheadervalue1="no-cache" blobheadername2="Pragma" blobheadervalue2="no-cache"To determine how long to cache a page or pagelet, these criteria are evaluated in this order:
- A value passed in using the
cachecontrol
parameter.- If there is no value in
cachecontrol
, the value in thesatellite.blob.cachecontrol.default
property, found in thefuturetense.ini
property file, is used.- If there is no value in
satellite.page.cachecontrol.default
, the value of theexpiration
property, located in thesatellite.properties
property file, is used.We recommend that the
cachecontrol
attribute be set for all blobs. If all blobs will have the same expiry, then consider setting thesatellite.blob.cachecontrol.default
property instead. Because the cache is actively managed when compositional dependencies are properly recorded, blobs can be set to never expire. This ensures that they always remain in cache, and the cache manager will ensure that they remain up-to-date..Error Numbers
There are no possible
errno
for this tag.Examples
The example below is in JSP. The XML syntax is analogous. This code creates an HTML <
img>
tag. Thesrc
attribute is the blob in the ImageFile table identified through the ID passed in withblobwhere='<%=ics.GetVar("asset:id")%>'
and both its horizontal and vertical spacing are at five pixels:<render:satelliteblob blobtable="ImageFile" blobkey="id" blobcol="urlpicture" blobwhere='<%=ics.GetVar("asset:id")%>' blobheader='<%=ics.GetVar("asset:mimetype")%>' service="img src"> <render:argument name="alt" value='<%=ics.GetVar("asset:alttext")%>'/> <render:argument name="hspace" value="5"/> <render:argument name="vspace" value="5"/> </render:satelliteblob>This code does the same, but the cached blob will be invalidated when the corresponding ImageFile asset is changed:
<render:satelliteblob c="ImageFile" field="urlpicture" cid='<%=ics.GetVar("asset:id")%>' blobheader='<%=ics.GetVar("asset:mimetype")%>' service="img src"> <render:argument name="alt" value='<%=ics.GetVar("asset:alttext")%>'/> <render:argument name="hspace" value="5"/> <render:argument name="vspace" value="5"/> </render:satelliteblob>This code does the same, but uses an already-loaded ImageFile asset instead:
<asset:load name="myasset" type="ImageFile" objectid='<%=ics.GetVar("asset:id")%>' /> <render:satelliteblob asset="myasset" field="urlpicture" blobheader='<%=ics.GetVar("asset:mimetype")%>' service="img src"> <render:argument name="alt" value='<%=ics.GetVar("asset:alttext")%>'/> <render:argument name="hspace" value="5"/> <render:argument name="vspace" value="5"/> </render:satelliteblob>This example shows how to render a blob for a flex asset using the c and cid parameter. render:satelliteblob logs the dependency for the blob against the asset so that whenever asset is modified the blob is also flushed.
<assetset:setasset name="as" type="Media_C" id="<%=ics.GetVar("asset:id")%>"/> <!-- Get a set of all values for the given attribute. --> <assetset:getattributevalues ordering="descending" name="as" typename="Media_A" attribute="FSII_NameAttr" immediateonly="true" listvarname="results"/> <ics:listloop listname="results"> <ics:listget listname="results" fieldname="value"/><br/> </ics:listloop> <render:satelliteblob c="Media_C" field="FSII_ImageFile" cid='<%=ics.GetVar("asset:id")%>' blobheader="image/gif" service="img src"> <render:argument name="alt" value="Image file"/> </render:satelliteblob>It is recommended to use parameters
blobtable
,blobkey
,blobcol
, andblobwhere
when rendering the blob instead ofc
andcid
. Also log the blob dependency usingparentid
attribute.See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.