contentURL JavaServer Page tag
JSP tag to include a system-generated cleartext
URL in the current stream that requests an image saved in an image content data instance (
class). This is a reusable, unhashed URL that can be
used more than once to refer to the image.
<img src='<pega:contentURL name="filename.fileType" path="/filePath/" classType="Image" />' >
Generates the following cleartext URL:
An image retrieved from an Image Content instance is the same for all requestors.
For an example, review the standard HTML rule @baseclass.Operator-Profile-Full. This rule supports the display of operator images in thedisplay. If an image content data instance for an operator is associated with an operator ID, that file is retrieved and included in the My Profile display. If no data content data instance is associated with the operator ID, the default image from the binary file rule image.dialogprofileimage.gif appears.
In the syntax presentation below:
- JSP delimiters <pega:...> and </pega:...> mark the start and end of the tag.
- Replace any text in italics with your choice of value of that type.
- Square brackets [ ] surround optional attributes.
<pega:contentURL name="filename.filetype" [path="filepath" ] classType = "Image" [ enforceAbsoluteURL = "true|false" ] />
attributes are required.
|Second key part ( File Name ) and third key part ( File Type ) of an image content data instance.|
|First key part ( File Path ) of an image content instance. Note that each path value starts and ends with a forward slash character. If the path is blank, this attribute can be omitted.|
Optional (only necessary for unusual situations). An absolute URL may be
needed in unusual situations where the base URL of the HTML page containing the tag
differs from typical structure. Set to "
Will result in:
If false, the system generates a relative URL. The default if this attribute omitted is "false".
Previous topic JSP tag — chart Next topic dataGrid JavaServer Page tag