Skip Headers

Oracle® Application Server 10g Multimedia Tag Library for JSP User's Guide and Reference
10g (9.0.4)
Part No. B10445-01
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next  

3 Media Retrieval Reference Information

Oracle Application Server 10g Multimedia Tag Library for JSP ("Multimedia 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. The media retrieval tags are as follows:

  • embedAudio

  • embedImage

  • embedVideo

  • mediaUrl

Media retrieval for a multimedia application includes the following tasks:

For more general purposes, Multimedia 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 servers, Oracle recommends using Oracle interMedia Plug-in for RealNetworks Streaming Servers rather than Multimedia Tag Library, for better performance.

In addition, Multimedia Tag Library is flexible enough to allow 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.


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, as well as 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 in this chapter for information about the input parameters to the media retrieval component.

Usage Notes

None.

Examples

This example shows how to 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 %>" ]
[ connCache = " <%= 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. Multimedia Tag Library supports a number of mechanisms for specifying database connection information. Application developers select the appropriate mechanism based on their application requirements and implementation. These mechanisms are as follows:

  • Data Source Name - OC4J provides built-in support for JDBC data sources. 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 interMedia objects in the database. Thus, a native Oracle data source is required.

    There are a number of native Oracle data sources. However, only data sources that support a connection caching mechanism, such as oracle.jdbc.pool.OracleConnectionCacheImpl, 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, will result in extremely poor performance. This will be especially noticeable for pages that include a number of multimedia data items, such as a set of thumbnail images.

  • Oracle JDBC Connection Cache - In applications that are stateless with respect to JDBC connections, JSP pages and JavaBeans can use the Oracle JDBC Connection Cache feature to manage database connections. In this scenario, a JDBC connection is obtained from the cache at the beginning of each HTTP request, and returned to the cache at the end of the request. Multimedia Tag Library provides built-in support for using a connection cache that implements the oracle.jdbc.pool.OracleConnectionCache interface in the media delivery component to retrieve media data and deliver it to the browser.

  • The OracleJSP ConnBeanCache JavaBean - This JavaBean extends the oracle.jdbc.pool.OracleConnectionCacheImpl connection caching mechanism. Thus, this connection caching mechanism is supported implicitly as a specific use of the Oracle JDBC Connection Cache.

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.

connCache

Database connection information in one of the following forms:

  • An instance of a class that implements the oracle.jdbc.pool.OracleConnectionCache interface, such as oracle.jdbc.pool.OracleConnectionCacheImpl.

  • An instance of the oracle.jsp.util.ConnBeanCache object.

Usage Notes

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

Examples

This example shows how to use the connCache attribute to specify the database connection.

<ord:embedVideo connCache = "<%= albumBean.getConnectionCache() %>"

              [ 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

This example 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 allows the original Web server to dictate how surrogates should 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: expiration_time[+removal_time], where expiration_time specifies how long the media object can be considered fresh, in seconds. After this time, the cache implementation must consider the cached object stale. removal_time is the delay before the object is removed from the cache after the time expires.

cache

The possible values are as follows:

  • 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. If the expiration attribute is not specified, the max-age directive in the Surrogate-Control response header is set as infinity.

Usage Notes

None.

Examples

Example 1: This example 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: This example 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: This example 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: This example 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: This example 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.

interMedia supports image, audio, and video data. Thus, the interMedia multimedia 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.


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 interMedia Reference and Oracle interMedia 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 not specified, the browser default player will be activated. Currently, Multimedia Tag Library supports three major media players: Windows Media Player, RealPlayer, and QuickTime Player. The Netscape 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 will be invoked by the Netscape browser.

showControls

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

autoStart

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

loop

Attribute that determines whether or not 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 Multimedia 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 Multimedia 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.

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 Multimedia 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 Multimedia 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: This example 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: This example 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:

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

Example 3: This example 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, as well as database connection information, such as an OracleConnectionCacheImpl object.


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 interMedia Reference and Oracle interMedia 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 not specified, the browser default player will be activated. Currently, Multimedia Tag Library supports three major media players: Windows Media Player, RealPlayer, and QuickTime Player. The Netscape 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 will be invoked by the Netscape browser.

showControls

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

autoStart

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

loop

Attribute that determines whether or not 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 Multimedia 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 Multimedia 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 this 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: This example 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: This example 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: This example 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: This example uses 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: This example uses 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

One of the following:

  • dataSourceName=name where:

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

  • IMConnCacheName=name where:

    name : is the Connection Cache name given by the tag library.

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 Multimedia JSP tags embedImage, embedAudio, and embedVideo respectively, also follows this format. For more information about these Multimedia JSP tags, see embedImage, embedAudio, and embedVideo.

Examples

See the examples in embedImage.

Left Curve
Popular Downloads
Right Curve
Untitled Document