IBM Cognos Proven Practices: Enabling Browsing for Images in IBM Cognos Express Report Studio

Nature of Document: Tip or Technique; Product(s): IBM Cognos Express; Area of Interest: Infrastructure

The goal of this document is to outline the different ways in which the WebDAV HTTP extension can be enabled for use with the “Browsing for Images” feature in IBM Cognos Express Report Studio.

Share:

Business Analytics Proven Practices Team, Business Analytics Proven Practices Team, IBM

Business Analytics Proven Practices Team



08 December 2011

Also available in Chinese

Introduction

Purpose

The goal of this document is to outline the different ways in which the WebDAV HTTP extension can be enabled for use with the “Browsing for Images” feature in IBM Cognos Express Report Studio.

Applicability

This document applies to both IBM Cognos Express version 9.0 and 9.5.


Background

Browsing for images in IBM Cognos Express Report Studio requires a technology called WebDAV to be enabled on the IBM Cognos Express endpoint (either a application server or web server).

The term Web-based Distributed Authoring and Versioning (WebDAV) refers to a collection of extensions to the Hypertext Transfer Protocol (HTTP) that allow you to manage files collaboratively on remote web servers such as IBM HTTP Server, Microsoft's Internet Information Server (IIS) and the Apache Tomcat application server. In essence it provides users with a framework that allows for creating, changing and moving documents. For more technical information on this topic please refer to RFC 4918 as this is outside the scope of this document.

WebDAV is leveraged in IBM Cognos Express as a feature in IBM Cognos Express Report Studio that allows Report Authors to simply 'Click and Browse' for any images they wish to include into reports just like they are browsing their file system. The benefits of this is that these authors then not need to worry about remembering these possibly long URLs.

As mentioned above, these extensions have to be enabled on the endpoint utilized by IBM Cognos Express. By default this end point is the Express Core dispatcher, although this can be changed to a web server in case Single Sign-On (SSO) integration with the Active Directory server is required.

Depending on your endpoint requirements, this document describes the steps that need to be taken in order to successfully allow the end user to browse for images using either endpoint.


Enabling WebDAV for IIS

IBM Cognos Express 9.0 and 9.5 on Windows 2003 (IIS 6)

  1. Set up the IBM Cognos Express gateway as described in the document Enabling Kerberos SSO in IBM Cognos Express on Windows Server 2003 under the section titled Setting up the Express Gateway.
  2. If you have the IBM Cognos Express Samples installed, copy the <express_installation_location>/webapps/p2pd/samples/images folder to the <express_gateway_location>/webcontent/samples folder. Otherwise just create an empty <express_gateway_location>/webcontent/samples folder.
  3. Open up IIS Manager and right click the IBMCognosExpress virtual directory. Under the New menu item, select Virtual Directory.
  4. Now walk through the wizard to configure the new virtual directory as follows:
    alias: samples
    Path: <express_gateway_location>/webcontent/samples
    Permissions: check the Read and Browse boxes
  5. In IIS Manager, select Web Service Extensions and make sure the WebDAV Service Extension is set to Allowed.
    Figure 1: The Web Service Extensions view in IIS Manager showing WebDAV as allowed
    Figure 1: The Web Service Extensions view in IIS Manager showing WebDAV as allowed
  6. In IBM Cognos Express Report Studio you can now browse for images using the following URI in the Image Browser dialog box:
    http://<express_gateway>/IBMCognosExpress/samples/images
    Figure 2: The Image Browser dialog using the configured URL
    Figure 2: The Image Browser dialog using the configured URL

IBM Cognos Express 9.5 on Windows 2008 (IIS 7)

  1. Set up the IBM Cognos Express gateway as described in the document Enabling Kerberos SSO in IBM Cognos Express on Windows Server 2008 under the section titled Setting up the Express Gateway.
  2. If you have the Cognos Express Samples installed, copy the <express_installation_location>/webapps/p2pd/samples/images folder to the <express_gateway_location>/webcontent/samples folder. Otherwise just create an empty <express_gateway_location>/webcontent/samples folder.
  3. Open up IIS Manager, right click the IBMCognosExpress virtual directory and select Add Virtual Directory.
  4. Now walk through the wizard to configure the new virtual directory as follows:
    alias: samples
    Physical Path: <express_gateway_location>/webcontent/samples
  5. Ensure the WebDAV Publishing and Directory Browsing roles have been installed in Server Manager.
    Figure 3: IIS Server Manager showing the various role services including WebDAV Publishing
    Figure 3: IIS Server Manager showing the various role services including WebDAV Publishing
  6. Open IIS Manager and select the samples virtual directory created in step 4. In the Features View, double click Directory Browsing and click Enable.
  7. Select Default Web Site, double click WebDAV Authoring Rules in the Features View and click Enable WebDAV.
  8. Select the samples virtual directory, double click WebDAV Authoring Rules in the Features View and click Add Authoring Rule. In the Add Authoring Rule dialog, create an authoring rule as follows:
    In the Allow access to: area, click the All content radio button.
    In the Allow access to this content to: area, click the All users radio button.
    In the Permissions area, click the Read check box.
    Figure 4: The Add Authoring Rule dialog showing the required access settings and permissions
    Figure 4: The Add Authoring Rule dialog showing the required access settings and permissionsNote: If there are any subdirectories in the samples virtual directory, this step needs to be repeated for every subdirectory containing images that should be able to be browsed for in IBM Cognos Express Report Studio.
  9. In IBM Cognos Express Report Studio you can now browse for images using the following URI in the Browse for Images dialog box:
    http://<express_gateway>/IBMCognosExpress/samples/images
    Figure 5: The Image Browser dialog using the configured URL
    Figure 5: The Image Browser dialog using the configured URL

Enabling WebDAV for Apache Tomcat

Enabling the Default WebDAV Servlet

The Apache Tomcat application server shipped with IBM Cognos Express has the ability to respond to WebDAV HTTP requests as well. However, this functionality is not enabled by default. The steps describing how to enable the default WebdavServlet that is shipped with Apache Tomcat are listed below.

  1. Verify the <express_installation_location>/webapps/p2pd/samples folder exists. If it doesn't please recreate the folder structure as mentioned above.
  2. Navigate to the <express_installation_location>/webapps/p2pd/WEB-INF folder.
  3. Make a backup copy of the web.xml file located in this folder.
  4. Open the original web.xml file and search for the first <servlet-mapping> tag.
  5. On the line preceding the <servlet-mapping> tag, add the following XML:
      <!-- WebDAV enable the app --> 
      <servlet> 
        <servlet-name>webdav</servlet-name> 
        <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class> 
        <init-param> 
          <param-name>debug</param-name> 
          <param-value>0</param-value> 
        </init-param> 
        <init-param> 
          <param-name>listings</param-name> 
          <param-value>true</param-value> 
        </init-param> 
        <init-param> 
          <param-name>readonly</param-name> 
          <param-value>true</param-value> 
        </init-param> 
        <!--load-on-startup>1</load-on-startup--> 
      </servlet> 
    
      <!-- The mapping for the WebDAV servlet --> 
      <servlet-mapping> 
        <servlet-name>webdav</servlet-name> 
        <url-pattern>/samples/images/</url-pattern> 
      </servlet-mapping>
  6. Save the changes and restart the IBM Cognos Express service.
  7. If the mapping has been successful you should be able to list the contents of the samples folder as in your browser using the following URL:
    http://express_server:express_port/p2pd/samples/images

Modify IBM Cognos Express Report Studio

Due to the basic nature of the default WebdavServlet's implementation, a modification to IBM Cognos Express Report Studio is required to make the servlet work with the studio.

  1. Navigate to the <express_installation_location>/webapps/p2pd/pat/hal/ folder.
  2. Depending on what version of IBM Cognos Express you are using, make a backup of the following file:
    • For IBM Cognos Express 9.0: _FK1.js
    • For IBM Cognos Express 9.5: _NK1js
  3. Open the original file and find the following section
    • For IBM Cognos Express 9.0:
      var _2H9='<D:propfind xmlns:D="DAV:">';if(_ZD6){for(var i=0;
      i<_ZD6.length;i++){_2H9 += '<D:prop><D:' + _ZD6[i] + 
      '/></D:prop>';}}else{_2H9+= '<D:allprop/>';
    • For IBM Cognos Express 9.5:
      var _NI9='<D:propfind xmlns:D="DAV:">';if(_IE6){for(var i=0;
      i<_IE6.length;i++){_NI9 += '<D:prop><D:' + _IE6[i] + 
      '/></D:prop>';}}else{_NI9+= '<D:allprop/>';
  4. Modify the section above to resemble the example below:
    • For IBM Cognos Express 9.0:
      var _2H9='<D:propfind xmlns:D="DAV:"><D:prop>';if(_ZD6){for(var i=0;
      i<_ZD6.length;i++){_2H9 += '<D:' + _ZD6[i] + 
      '/>';}}else{_2H9+= '</D:prop><D:allprop/>';
    • For IBM Cognos Express 9.5:
      var _NI9='<D:propfind xmlns:D="DAV:"><D:prop>';if(_IE6){for(var i=0;
      i<_IE6.length;i++){_NI9 += '<D:' + _IE6[i] + 
      '/>';}}else{_NI9+= '</D:prop><D:allprop/>';
    Note: In both examples above, the sections that need modifying are bolded.
  5. Save the file and restart IBM Cognos Express Report Studio.
  6. In IBM Cognos Express Report Studio you can now browse for images using the following URI in the Browse for Images dialog box:
    http://<express_server>:<express_port>/p2pd/samples/images/
    Figure 6: The Image Browser dialog using the configured URL
    Figure 6: The Image Browser dialog using the configured URL

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Big data and analytics on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Big data and analytics, Information Management
ArticleID=779694
ArticleTitle=IBM Cognos Proven Practices: Enabling Browsing for Images in IBM Cognos Express Report Studio
publish-date=12082011