The content_redir.properties file
configures redirections to Workplace XT Java Server Pages (JSP) or
servlets, or to custom or vendor applications, when a user attempts
to open a file from inside Workplace XT. Redirections are based on
content MIME type. This topic shows you how to customize the redirections.
The following section explains how the application uses content_redir.properties. To customize redirections, see
the section Modifying the redirection properties file.
Overview
of content redirection
The
content_redir.properties consists of key/value pairs, where the key is a MIME type, and the
value specifies the component to be used to open a file of the associated
MIME type. The listing below is for Image Viewer and is used here
as an example. The example can be applied to other applications. In
examining the listing, note the following points:
- The first group of key/value pairs map MIME types to the Image
Viewer. To take advantage of the annotations feature in Image Viewer,
you can edit this file to specify which image types open in Image
Viewer. The listing shows the MIME types that are opened by the Image
Viewer, those with a value of /WcmJavaViewer.jsp?{QUERY_STRING}. See Work with Image Viewer for more
information about Image Viewer.
- Keys in content_redir.properties are based
on the mimeType property defined in certain Content Engine classes.
See About MIME types for more information.
- A value can include macros, such as {QUERY_STRING}. The available macros are documented in content_redir.properties.
- If a MIME type is not defined in content_redir.properties, the getContent servlet is invoked, and responds according to the
object type selected. See Default behavior of the getContent servlet,
below.
- For document object types, redirection behavior is additionally
defined by certain settings, which you must take into account if you
modify content_redir.properties. See Interaction
with other settings, below.
# Comment the lines with MIME types to not be opened by the Image Viewer applet
image/pjpeg=/WcmJavaViewer.jsp?{QUERY_STRING}
image/jpg=/WcmJavaViewer.jsp?{QUERY_STRING}
image/jpeg=/WcmJavaViewer.jsp?{QUERY_STRING}
image/bmp=/WcmJavaViewer.jsp?{QUERY_STRING}
image/tiff=/WcmJavaViewer.jsp?{QUERY_STRING}
image/gif=/WcmJavaViewer.jsp?{QUERY_STRING}
application/x-cold=/WcmJavaViewer.jsp?{QUERY_STRING}
application/x-visio=/redirect/customAppRedirect.jsp?vsId={VERSION_SERIES_ID}&objectStoreName={OBJECT_STORE_NAME}&id={OBJECT_ID}&objectType=document
application/vnd.filenet.im-image=/WcmJavaViewer.jsp?{QUERY_STRING}
application/vnd.filenet.im-cold=/WcmJavaViewer.jsp?{QUERY_STRING}
application/vnd.filenet.im-form=/WcmJavaViewer.jsp?{QUERY_STRING}
application/vnd.filenet.im-other=/WcmJavaViewer.jsp?{QUERY_STRING}
folder=/WcmObjectBookmark.jsp
customobject=/integrationWebBasedCommand?_commandId=3010
showPropertiesCommand=/integrationWebBasedCommand?_commandId=3010
application/x-filenet-search=/WcmObjectBookmark.jsp
application/x-filenet-searchtemplate=/WcmObjectBookmark.jsp
application/x-filenet-workflowdefinition=/eprocess/WcmDesigner.jsp
application/x-filenet-scenariodefinition=/eprocess/WcmSimDesigner.jsp
...
Default behavior of the getContent servlet
If a MIME type is not specified in
content_redir.properties, the application invokes the getContent servlet. The servlet's behavior
is determined by the type of object selected, as listed below.
- Folder
- Redirects client to a page displaying the folder.
- Document
- If the document has content, the content is returned to the browser.
- If the document has an external reference, the servlet redirects
the client appropriately.
- If the document has no content, an error is reported.
- Workflow Definition Document
- Redirects client to Workflow Designer.
- Stored Search
- Redirects client to a page displaying the stored search.
- Search Template
- Redirects client to a page displaying the search template.
- Publish Template
- The content of the publish template is returned as XML.
Interaction with other settings
In addition to the content_redir.properties file settings, a hidden property on document type objects, which
includes images, affects the redirection behavior. This hidden property,
called "IgnoreRedirect" is not set by default. It can only be set
programmatically or through Enterprise Manager.
When opening
document-type objects, the application looks at the IgnoreRedirect
property and does the following actions:
- If IgnoreRedirect is set to True, it sends the document to the
browser.
- If IgnoreRedirect is set to False, it sends the document to the
component specified in content_redir.properties.
- If IgnoreRedirect is not set (NULL), it sends the document to
the component specified in content_redir.properties.
For documents stored in an external library,
such as Image Services, there is a external service site preference
called "Include Redirect". By default, this preference is set to "Yes".
If it is set to "Yes", the URL is appended with the IgnoreRedirect
property setting on the image. See External services preferences for more information about this preference.
When opening
images stored in Image Services, the application does the following
actions:
- If "Include Redirect" = Yes, and the document property IgnoreRedirect
= true, the application sends the image to the browser.
- If "Include Redirect" = Yes, and the document property IgnoreRedirect
= false, the application sends the image to the destination specified
in content_redir.properties.
- If "Include Redirect" = No, the IgnoreRedirect property setting
is not included on the URL, and the application sends the image to
the destination specified in content_redir.properties.
Modifying the redirection properties file
You can
customize the redirections by modifying content_redir.properties. For example, you can add redirections to vendor applications, or
comment out existing redirections and allow the getContent servlet
to handle objects of the commented-out MIME type.
Note: Before
modifying content_redir.properties, check the
IgnoreRedirect property and the "Include Redirect" site preference
for the MIME types for which you want to define redirections.