3 Media Retrieval Reference

Oracle Multimedia JSP Tag Library provides media retrieval tags that facilitate generating complete HTML multimedia tags or creating multimedia retrieval URLs for inclusion in the customized use of an HTML multimedia tag.

Media retrieval for a multimedia application includes the following tasks:

For more general purposes, Oracle Multimedia JSP Tag Library can generate HTML tags, with some level of customization capability, for the following media types:

Note:

For audio and video media data stored in Oracle Database that is accessed and delivered by RealNetworks streaming servers, Oracle recommends using Oracle Multimedia Plug-in for RealNetworks Streaming Servers rather than the Oracle Multimedia JSP Tag Library, for better performance.

In addition, Oracle Multimedia JSP Tag Library is flexible enough to permit the construction of HTML tags that render media data according to the requirements of the application, while using the tag library to construct media retrieval URLs and deliver the media to the browser.

Oracle Multimedia JSP Tag Library contains the following information about the media retrieval tags that operate on Oracle Multimedia objects:


General Format for Media Retrieval Tags

Format

<ord:tagName [ custom-retrieval-attributes ] [ database-connection-attributes ] [ media-access-attributes ] [ media-cache-control-attributes ] [ table-and-column-attributes ] [ media-render-attributes ]></ord:tagName>

Description

Provide the ability to generate complete HTML media tags, such as <IMG>, or the ability to create media retrieval URLs for inclusion in the customized use of an HTML media tag. The media retrieval tags include the following tags under the prefix ord: mediaUrl, embedImage, embedAudio, and embedVideo.

Media retrieval tags have a set of common attributes, and tag-specific attributes that render media. This section describes the following common attributes and their parameters in detail: custom-retrieval-attributes, database-connection-attributes, media-access-attributes, media-cache-control-attributes, and table-and-column-attributes. The media-render-attributes are tag-specific; therefore, they are described in the sections for each media retrieval tag.

Usage Notes

When using media retrieval tags, the following information must be specified:

  • Database connection information through which media data is retrieved from the database.

  • Table, column, and key information that describes where the media data is to be retrieved from the database.

Thus, either database-connection-attributes and table-and-column-attributes or media-access-attributes must be specified.


custom-retrieval-attributes

Format

custom-retrieval-attributes = retrievalPath = "string | <%= jspExpression %>"

Description

Offer a mechanism to supply the name of an application-specific media retrieval component for applications that require a high level of control over the delivery of media data. This retrieval component becomes part of the generated URL.

Parameters

retrievalPath

The path to the customized media retrieval component. See Media Retrieval URL Format for information about the input parameters to the media retrieval component.

Usage Notes

None.

Examples

Use the retrievalPath attribute to introduce a customized version of the OrdGetMediaJsp.jsp file, which operates as a media delivery JSP page:

<ord:embedVideo { database-connection-attributes }
                [ media-cache-control-attributes ]
                  retrievalPath = "customGet.jsp" 
                { table-and-column-attributes }
                { media-attributes } />

database-connection-attributes

Format

database-connection-attributes = dataSourceName = "string | <%= jspExpression %>"

Description

Specify the database connection. To retrieve media data from the database and deliver it to the browser, the media delivery component must have access to a database connection. Oracle Multimedia JSP Tag Library supports the use of data sources to specify connection properties.

The JDBC connection obtained from a data source must be able to support access to database objects and binary large objects (BLOBs) so that media data can be retrieved from Oracle Multimedia objects in the database. Thus, a native Oracle data source is required.

There are several native Oracle data sources. However, only data sources that support a connection caching mechanism are practical in a production environment. Other data sources, such as those that create a new JDBC database connection for each request to get a connection, result in extremely poor performance. This is especially noticeable for pages that include several multimedia data items, such as a set of thumbnail images.

To use a data source in a JSP page, you must define the data source, its JNDI name, and its connection and pooling properties. In OC4J, you define these attributes in a <data-source> element in the data-source.xml file. See Oracle Containers for J2EE Services Guide for more information about data sources.

The specified database connection is used by the media delivery component to retrieve media data from the database.

Parameters

dataSourceName

The name of a JDBC data source that can be retrieved using a default initial Java Naming and Directory Interface (JNDI) context.

Usage Notes

If you do not specify media-access-attributes, then you must specify database-connection-attributes and table-and-column-attributes.

Examples

Use the dataSourceName attribute to specify the database connection:

<ord:embedVideo dataSourceName = "empDB"
              [ media-cache-control-attributes ]
              [ custom-retrieval-attributes ]
              { table-and-column-attributes }
              { media-attributes } />

media-access-attributes

Format

media-access-attributes = mediaAccessUnit = "string | <%= jspExpression %>" [ key = "string | <%= jspExpression %>" ] [ rowid = "string | <%= jspExpression %>" ]

Description

Simplify the use of the retrieval tags. The information in the following attributes can be specified in the predefined OrdJspTag.xml file: database-connection-attributes, table-and-column-attributes, media-cache-control-attributes, and custom-retrieval-attributes. Then, in the retrieval tags, these attributes can be replaced with media-access-attributes, in which the mediaAccessUnit attribute is used to refer to the information defined in the OrdJspTag.xml file. If the mediaAccessUnit attribute and other attributes (for example: media-cache-control-attributes) are used together, the attribute defined in the tag overrides the attribute defined in the OrdJspTag.xml file. (See Appendix A for an example of this tag library configuration file.)

Parameters

mediaAccessUnit

A String literal or expression that specifies the name of the access-unit attribute defined in the OrdJspTag.xml file.

key

Row information that works with the mediaAccessUnit attribute to locate the media data in the table.

rowid

Row information that works with the mediaAccessUnit attribute to locate the media data in the table.

Usage Notes

If you do not specify database-connection-attributes and table-and-column-attributes, then you must specify media-access-attributes.

Either the key attribute or the rowid attribute must be specified in the tag.

Examples

Shows the mediaAccessUnit attribute being used in two ways, first with the key attribute and then with the rowid attribute. The first six lines of code represent a section of the OrdJspTag.xml file in which the access-unit attribute defines photoUnit.

<access-unit name="photoUnit" 
                 dataSourceName="myMediaDataDS" 
                 table="public_photos" 
                 keyColumn="ename" 
                 column="photo"
                      expiration="3600+60"/>
<ord:embedImage mediaAccessUnit="photoUnit">
                key = "SMITH"    
              { media-render-attributes }/>

or:

<ord:embedImage mediaAccessUnit="photoUnit">
                rowid = "<%= empBean.getRowid() %>"
              { media-render-attributes }/>

media-cache-control-attributes

Format

media-cache-control-attributes = [ expiration = "string | <%= jspExpression %>" ] [ cache = "yes | no | no-remote | <%= jspExpression %>" ]

Description

Helps generate the Surrogate-Control response header for Web cache control. This response header enables the original Web server to dictate how surrogates are to handle response entities. The value of the expiration attribute in the tag is translated into the Surrogate-Control control max-age directive. The value of the cache attribute in the tag is translated into the Surrogate-Control no-store or no-store-remote directive.

Parameters

expiration

The value in the same format as the Surrogate-Control header's max-age directive is:

expiration_time[+removal_time]

where:

expiration_time: the amount of time during which the media object can be considered fresh, in seconds. After this time, the cache implementation must consider the cached object stale.

removal_time: the delay before the object is removed from the cache after the time expires.

If the expiration attribute is not specified, the max-age directive in the Surrogate-Control response header is set as infinity.

cache

The following table shows the valid values for this parameter:

Value Description
no The no-store directive in the Surrogate-Control response header
no-remote The no-store-remote directive in the Surrogate-Control response header
yes The Web cache is used

For more information about Oracle Web Cache, see Oracle Fusion Middleware Administrator's Guide for Oracle Web Cache in the Oracle Fusion Middleware Online Documentation Library.

Usage Notes

None.

Examples

Example 1: Shows how to use the expiration attribute.

<ord:embedVideo { database-connection-attributes }
                  expiration = "600" 
                [ custom-retrieval-attributes ]
                { table-and-column-attributes }
                { media-attributes } />

Example 2: Shows how to use the cache attribute.

<ord:embedVideo { database-connection-attributes }
                  cache = "no" 
                [ custom-retrieval-attributes ]
                { table-and-column-attributes }
                { media-attributes } />

table-and-column-attributes

Format

table-and-column-attributes = table = "string | <%= jspExpression %>" column = "string | <%= jspExpression %>" [ key = "string | <%= jspExpression %>" ] [ keyColumn = "string | <%= jspExpression %>" ] [ rowid = "string | <%= jspExpression %>" ]

Description

Specify where the media data is located in the database. There are three ways to identify the media data in the database:

  • Use a primary key by specifying the key value with the key attribute.

  • Use any column by specifying the column name with the keyColumn attribute and the column value with the key attribute.

  • Use a ROWID by specifying the rowid attribute.

Parameters

table

A String literal or expression that specifies the name of the table containing the media data.

column

A String literal or expression that specifies the name of the column containing the media data.

key

A String literal or expression that specifies the key value to use to fetch the media. The table's primary key is used if the keyColumn attribute is not specified. If the table does not have a primary key, a key column name must be specified with the keyColumn attribute.

keyColumn

A String literal or expression that specifies the column to use to access the media.

rowid

A String literal or expression that indicates the ROWID of the media in the specified table. Specifying this attribute is the equivalent of specifying key="rowid-value" keyColumn="rowid".

Usage Notes

If you do not specify media-access-attributes, then you must specify table-and-column-attributes and database-connection-attributes.

The attributes key, keyColumn, and rowid must be specified in one of the following combinations:

  • key

  • key and keyColumn

  • rowid

Examples

Example 1: Shows how to use the table, column, and key attributes.

<ord:embedVideo { database-connection-attributes }
                [ media-cache-control-attributes ]
                [ custom-retrieval-attributes ]
                  table = "emp" column = "photo" 
                  key = "<%= empBean.getEmpno() %>"
                { media-attributes } />

Example 2: Shows how to use the table, column, key, and keyColumn attributes.

<ord:embedVideo { database-connection-attributes }
                [ media-cache-control-attributes ]
                [ custom-retrieval-attributes ]
                  table = "emp" column = "photo" 
                  key = "SMITH" keyColumn = "ename"
                { media-attributes } />

Example 3: Shows how to use the table, column, and rowid attributes.

<ord:embedVideo { database-connection-attributes }
                [ media-cache-control-attributes ]
                [ custom-retrieval-attributes ]
                  table = "emp" column = "photo" 
                  rowid = "<%= empBean.getRowid() %>"
                { media-attributes } />

media-render-attributes

In the following sections, the media retrieval tags are defined with their specific media-render-attributes.

Oracle Multimedia supports image, audio, and video data. Thus, Oracle Multimedia JSP Tag Library retrieval tags support only those media types. No support is provided for other media types, such as text-based or application-specific types, that might be stored in the OrdDoc object type.


Media Retrieval Tags

This section presents reference information about these media retrieval tags, which operate on Oracle Multimedia objects:


embedAudio

Format

<ord:embedAudio [ database-connection-attributes ] [ table-and-column-attributes ] [ custom-retrieval-attributes ] [ media-access-attributes ] [ media-cache-control-attributes ]
[ height = "number | <%= jspExpression %>" ] [ width = "number | <%= jspExpression %>" ] [ alt = "string | <%= jspExpression %>" ] [ helperApp = "mediaPlayer | realPlayer | quicktimePlayer | <%= jspExpression %>" ] [ showControls = "true | false | <%= jspExpression %>" ] [ autoStart = "true | false | <%= jspExpression %>" ] [ loop = "true | false | <%= jspExpression %>" ] [ standby = "string | <%= jspExpression %>" ] [ audio = "<%= jspExpression %>" ] />

Description

Builds an HTML <OBJECT> tag and <EMBED> tag to embed an audio object in a page. This tag can specify the audio player to be used in the client's browser. It also defines a common set of audio attributes. See Oracle Multimedia Reference and Oracle Multimedia User's Guide for information about supported audio formats.

Parameters

height

The height of the displayed window, which overrides the default height of the displayed window.

width

The width of the displayed window, which overrides the default width of the displayed window.

alt

Brief alternate text that is displayed when the media cannot be retrieved or displayed.

helperApp

The name of the media player to be used by the browser to play the media. If a media player is not specified, the browser default player is activated. Currently, Oracle Multimedia JSP Tag Library supports three major media players: Windows Media Player, RealPlayer, and QuickTime Player. The Firefox browser, however, invokes a media player plug-in based on the MIME type of the media. Thus, the generated HTML tag has no control over the media player that is invoked by the Firefox browser.

showControls

Attribute that determines whether to show the control components of the player.

autoStart

Attribute that determines whether to play the audio automatically when it is retrieved.

loop

Attribute that determines whether to repeatedly play the audio.

standby

Attribute that specifies what to display when the audio is being retrieved.

audio

An instance of the oracle.ord.im.OrdAudio object. Because Oracle Multimedia JSP Tag Library must obtain the audio information from the oracle.ord.im.OrdAudio object, using the audio attribute is the most efficient way to use the Oracle Multimedia JSP Tag Library in cases where the JSP page has already fetched the row containing the audio object from the database.

Usage Notes

None.

Examples

See the examples in embedVideo.


embedImage

Format

<ord:embedImage [ database-connection-attributes ] [ table-and-column-attributes [ [ custom-retrieval-attributes ] [ media-access-attributes ] [ media-cache-control-attributes ] [ height = "number | <%= jspExpression %>" ] [ width = "number | <%= jspExpression %>" ] [ border = "number | <%= jspExpression %>" ] [ align = "left | right | top | bottom | middle | <%= jspExpression %>" ] [ alt = "string | <%= jspExpression %>" ] [ longdesc = "string | <%= jspExpression %>" ] [ image = "<%= jspExpression %>" ] />

Description

Builds an HTML <IMG> tag to embed an image in a page. A common set of <IMG> tag attributes, such as height, width, border, and align are also defined. The generated <IMG> tag always includes the height and width attributes. If these attributes are not specified in this tag, they are obtained either from the image object specified in this tag, or from the image object fetched from the database. See Oracle Multimedia Reference and Oracle Multimedia User's Guide for information about supported image formats.

Parameters

height

The height of the displayed window, which overrides the default height of the displayed window.

width

The width of the displayed window, which overrides the default width of the displayed window.

border

The border of the displayed image.

align

The alignment of the displayed image, which can be bottom, middle, top, left, or right.

alt

Brief alternate text that is displayed when the image cannot be retrieved or displayed.

longdesc

A link to the detailed (long) description of the image, which supplements the brief description provided by the alt attribute.

image

An instance of the oracle.ord.im.OrdImage object. Because Oracle Multimedia JSP Tag Library must obtain the image information from the oracle.ord.im.OrdImage object, using the image attribute is the most efficient way to use the Oracle Multimedia JSP Tag Library in cases where the JSP page has already fetched the row containing the image object from the database.

Usage Notes

None.

Examples

Example 1: Shows how to use the border, alt, and align attributes in the embedImage tag.

<ord:embedImage dataSourceName = "empDB"
                table = "emp" column = "photo" 
                key = "<%= empBean.getEmpno() %>"
                alt = "Employee photo"
                border = "1"
                align = "middle" />
 

The generated HTML tag would be as follows:

<img src="OrdGetMediaServlet?dataSourceName=
 empDB&table=emp&column=photo&key=1&timeStamp=111078352&ext=.jpg"
 height=256 width=256 alt="Employee photo" border=1 align="middle"/>

Example 2: Shows how to use the height and width attributes to override the actual height and width of the image.

<ord:embedImage dataSourceName = "empDB"
                table = "emp" column = "photo" 
                key = "SMITH" keyColumn = "ename"
                height = "100" width = "100" />
 

The generated HTML tag would be as follows:

<img src="OrdGetMediaServlet?dataSourceName=
 empDB&table=emp&column=photo&key=1&keyColumn=
 "ename"&timeStamp=111078352&ext=.jpg" height=100 width=100/>

Example 3: Shows how to use the image attribute.

<ord:embedImage dataSourceName = "empDB"
                table = "emp" column = "photo"
                rowid = "<%= empBean.getRowId() %>" 
                image = "<%= empBean.getPhoto() %>" />

The generated HTML tag would be as follows:

<img src="OrdGetMediaServlet?dataSourceName=
 empDB&table=emp&column=photo&rowid=AAAH2cAABAAAPAxAAA&
 timeStamp=111078352&ext=.jpg" height=256 width=256/>

where:

  • empBean: is a JavaBean used to access an employee schema in a database. It includes get( ) methods that return column values, such as empno as a String object and photo as an OrdImage object, and database connection information.


embedVideo

Format

<ord:embedVideo [ table-and-column-attributes ] [ database-connection-attributes ] [ custom-retrieval-attributes ] [ media-access-attributes ] [ media-cache-control-attributes ]
[ height = "number | <%= jspExpression %>" ] [ width = "number | <%= jspExpression %>" ] [ alt = "string | <%= jspExpression %>" ] [ helperApp = "mediaPlayer | realPlayer | quicktimePlayer | <%= jspExpression %>" ] [ showControls = "true | false | <%= jspExpression %>" ] [ autoStart = "true | false | <%= jspExpression %>" ] [ loop = "true | false | <%= jspExpression %>" ] [ standby = "string | <%= jspExpression %>" ] [ video = "<%= jspExpression %>" ] />

Description

Builds an HTML <OBJECT> tag and <EMBED> tag to embed a video object in a page. This tag can specify the video player to be used in the client's browser. It also defines a common set of video attributes. See Oracle Multimedia Reference and Oracle Multimedia User's Guide for information about supported video formats.

Parameters

height

The height of the displayed window, which overrides the default height of the displayed window.

width

The width of the displayed window, which overrides the default width of the displayed window.

alt

Brief alternate text that is displayed when the media cannot be retrieved or displayed.

helperApp

The name of the media player to be used by the browser to play the media. If a media player is not specified, the browser default player is activated. Currently, Oracle Multimedia JSP Tag Library supports three major media players: Windows Media Player, RealPlayer, and QuickTime Player. The Firefox browser, however, invokes a media player plug-in based on the MIME type of the media. Thus, the generated HTML tag has no control over the media player that is invoked by the Firefox browser.

showControls

Attribute that determines whether to show the controls components of the player.

autoStart

Attribute that determines whether to play the video automatically when it is retrieved.

loop

Attribute that determines whether to repeatedly play the video.

standby

Attribute that specifies what to display when the video is being retrieved.

video

An instance of the oracle.ord.im.OrdVideo object. Because Oracle Multimedia JSP Tag Library must obtain the video information from the oracle.ord.im.OrdVideo object, using the video attribute is the most efficient way to use the Oracle Multimedia JSP Tag Library in cases where the JSP page has already fetched the row containing the video object from the database.

Usage Notes

None.

Examples

This example shows how to use the embedVideo tag with its media-render-attributes. In the example, the helperApp attribute includes all the possible choices of media players.

The following example uses the same JavaBean (empBean) as in the example for embedImage. The three samples that follow show HTML output for the three media players.

<ord:embedVideo dataSourceName = "empDB"
                table = "emp" column = "greetings" 
                key = "<%= empBean.getEmpno() %>"
                alt = "Employee greetings"
                height = 240 width = 300 
                helperApp = "mediaPlayer|realPlayer|quicktimePlayer"
                showControls = "true"
                autoStart = "true"
                loop = "true"
                  standby = "Loading media player components ..." />

Sample Output 1: Shows the generated HTML tag for Windows Media Player. It uses video data with the file extension .avi, and with the value of the helperApp attribute set to mediaPlayer.

<OBJECT 
   ID="mediaPlayer" 
   CLASSID= "clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
   CODEBASE= "http://activex.microsoft.com/activex/controls/
     mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
   TYPE="application/x-oleobject" 
   STANDBY="Loading media player components..." 
   HEIGHT="240" WIDTH="300"> 
   <PARAM NAME="showcontrols" VALUE="true">
   <PARAM NAME="autostart" VALUE="true">
   <PARAM NAME="loop" VALUE="true">
   <PARAM NAME="filename"   VALUE="OrdGetMediaServlet?dataSourceName=empDB&table=
     emp&column=greetings&key=1&timeStamp=111078352&ext=.avi">

   <EMBED TYPE="video/x-msvideo" 
          STANDBY="Loading media player components…"
          CONTROLLER="true" 
          CONTROLS="ImageWindow,ControlPanel" 
          SHOWCONTROLS="true" 
          AUTOSTART="true" 
          LOOP="true" 
          HEIGHT="240"  WIDTH="300" 

 SRC="OrdGetMediaServlet?dataSourceName=empDB&table=
  emp&column=greetings&key=1&timeStamp=111078352&ext=.avi" >

where:

  • .avi: is the file extension for Microsoft AVI media.

  • mediaPlayer: is the value of the helperApp attribute.

  • video/x-msvideo: is the MIME type of the media data.

Sample Output 2: Shows the generated HTML tag for RealPlayer. It uses video data with the file extension .rm, and with the value of the helperApp attribute set to realPlayer.

<OBJECT 
   ID="RVOCX" 
   CLASSID= "clsid: CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
   STANDBY="Loading media player components..." 
   HEIGHT="240" WIDTH="300" >
   <PARAM NAME="controls" VALUE="ImageWindow, ControlPanel">
   <PARAM NAME="autostart" VALUE="true">
   <PARAM NAME="loop" VALUE="true">
   <PARAM NAME="filename" VALUE="OrdGetMediaServlet?dataSourceName=empDB&table=
     emp&column=greetings&key=1&timeStamp=111078352&ext=.rm">

   <EMBED TYPE="audio/x-pn-realaudio-plugin" 
          STANDBY="Loading media player components…"
          CONTROLLER="true" 
          CONTROLS="ImageWindow,ControlPanel" 
          SHOWCONTROLS="true" 
          AUTOSTART="true" 
          LOOP="true" 
          HEIGHT="240"  WIDTH="300" 
 SRC="OrdGetMediaServlet?dataSourceName=empDB&table=
  emp&column=greetings&key=1&timeStamp=111078352&ext=.rm" >
   <NOEMBED>
   <P>Employee Greetings.</P>
   </NOEMBED>
</OBJECT>

where:

  • .rm: is the file extension for RealNetworks Real Video media.

  • realPlayer: is the value of the helperApp attribute.

  • audio/x-pn-realaudio-plugin: is the MIME type of the media data.

Sample Output 3: Shows the generated HTML tag for QuickTime Player. It uses video data with the file extension .mov, and with the value of the helperApp attribute set to quicktimePlayer.

<OBJECT 
   CLASSID= "clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
   CODEBASE= "http://www.apple.com/qtactivex/qtplugin.cab”
   STANDBY="Loading media player components..." 
   HEIGHT="240" WIDTH="300" >
   <PARAM NAME="controller" VALUE="true">
   <PARAM NAME="autostart" VALUE="true">
   <PARAM NAME="loop" VALUE="true">
   <PARAM NAME="filename"   VALUE="OrdGetMediaServlet?dataSourceName=empDB&table=
     emp&column=greetings&key=1&timeStamp=111078352&ext=.mov">

   <EMBED TYPE="video/quicktime" 
          STANDBY="Loading media player components…"
          CONTROLLER="true" 
          CONTROLS="ImageWindow,ControlPanel" 
          SHOWCONTROLS="true" 
          AUTOSTART="true" 
          LOOP="true" 
          HEIGHT="240"  WIDTH="300" 
 SRC="OrdGetMediaServlet?dataSourceName=empDB&table=
  emp&column=greetings&key=1&timeStamp=111078352&ext=.mov" >
   <NOEMBED>
   <P>Employee Greetings.</P>
   </NOEMBED>
</OBJECT>
 

where:

  • .mov: is the file extension for Apple QuickTime media.

  • quicktimePlayer: is the value of the helperApp attribute.

  • video/quicktime: is the MIME type of the media data.


mediaUrl

Format

<ord:mediaUrl [ database-connection-attributes ] [ table-and-column-attributes ] [ custom-retrieval-attributes ] [ media-access-attributes ] [ media-cache-control-attributes ] id = "string" > tag body... </ord:mediaUrl>

Description

Generates a media retrieval URL object that can be used in the tag body.

Parameters

id

The name of the script variable. The URL of the media objects in the database can be obtained by calling the getUrl( ) method while using this script variable.

Usage Notes

None.

Examples

Example 1: Use the generated URL in the customized HTML <IMG> tag:

<ord:mediaUrl dataSourceName = "empDB" 
              table = "emp" column = "photo" 
              key = "1" 
              id= "photo" >

     <img src="<%= photo.getUrl( ) %>" onmouseover="..." ...>

</ord:mediaUrl>

Example 2: Use the generated URL within the HTML <A> (link) tag to locate an image file in an employee database:

<ord:mediaUrl dataSourceName = "empDB"
              table = "emp" column = "photo" 
              key = "1"
              id = "photo" >

   <a href="<%= photo.getUrl() %>"> Click here to view image </a>

</ord: mediaUrl>

Media Retrieval URL Format

Format

<mediaRetrievalPath>? <databaseConnection>& <tableInfo>& <columnInfo>& <rowInfo>& <expiration>& <cache>& <updateTimeStamp>& <fileExtension>

Description

Specifies the format of the URL string generated by the media retrieval tags. This URL string is passed to the media delivery component to retrieve the media data.

Parameters

mediaRetrievalPath

The value of the retrievalPath attribute specified in the media retrieval tag. By default, the value is OrdGetMediaServlet.

databaseConnection

dataSourceName=name where:

name: is the Data Source name specified in the tag.

tableInfo

table=tableName where:

tableName: is specified in the tag.

columnInfo

column=columnName where:

columnName: is specified in the tag.

rowInfo

One of the following, depending on the row information specified in the tag:

  • key=keyVal

  • rowid=rowidVal

  • key=keyVal&keyColumn=keyColumnName

expiration

The optional cache control attribute expiration=expirationValue where:

expirationValue: is specified in the tag.

cache

The optional cache control attribute cache=cacheValue where:

cacheValue: is specified in the tag.

updateTimeStamp

timeStamp=timestampvalue where:

timestampvalue: is the last update time of the media object.

fileExtension

ext=.fileExt where:

fileExt: is the file extension of the media.

Usage Notes

The SRC attribute in the HTML <IMG>, <OBJECT>, and <EMBED> tags, which are generated by the Oracle Multimedia JSP Tag Library tags embedImage, embedAudio, and embedVideo respectively, also follows this format. For more information about these JSP tags, see embedImage, embedAudio, and embedVideo.

Examples

See the examples in embedImage.