How to enable Cross-Origin Resource Sharing (CORS) Filter Settings in CA Service Desk Manager (CA SDM)

Document ID : KB000031714
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

CORS Filter is the first universal solution for fitting Cross-Origin Resource Sharing (CORS) support to Java web applications. CORS is a recent W3C effort to introduce a standard mechanism for enabling cross-domain requests from web browsers to servers that wish to handle them.

Solution:

The following instructions outline how to configure Apache Tomcat 7.0.55 for use with CA Service Desk Manager to add CORS Support. 

Note: Make sure the Tomcat is upgraded to at least version 7.0.41

1.   Take the backup of WEB.XML from NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd\WEB-INF

 001.JPG

2.   Open WEB.XML from NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd\WEB-INF with a text editor

002.JPG

3.   Look for the statement

 <!-- Add filter here -->

 003.JPG 

4.   Copy and paste the following configuration

 <!-- Cross-origin support for Attachments Servlet -->

 <filter>

 <filter-name>CORS</filter-name>

 <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>

 <init-param>

 <param-name>cors.supportedMethods</param-name>

 <param-value>POST, GET, OPTIONS</param-value>

 </init-param>

 <init-param>

 <param-name>cors.allowOrigin</param-name>

 <param-value>*</param-value>

 </init-param>

 </filter>

5.   Look for the statement

 <!-- Add filter-mapping here -->

 005.JPG 

6.   Copy and paste the following configuration

 <!-- Cross-origin support for Attachments Servlet -->

 <filter-mapping>

 <filter-name>CORS</filter-name>

 <servlet-name>UploadServlet</servlet-name>

 </filter-mapping>

 7.   When completed, the added content should look like below

 <!-- Add filter here -->

 <!-- Cross-origin support for Attachments Servlet -->

 <filter>

 <filter-name>CORS</filter-name>

 <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>

 <init-param>

 <param-name>cors.supportedMethods</param-name>

 <param-value>POST, GET, OPTIONS</param-value>

 </init-param>

 <init-param>

 <param-name>cors.allowOrigin</param-name>

 <param-value>*</param-value>

 </init-param>

 </filter>

 <!-- Add filter-mapping here -->

 <!-- Cross-origin support for Attachments Servlet -->

 <filter-mapping>

 <filter-name>CORS</filter-name>

 <servlet-name>UploadServlet</servlet-name>

 </filter-mapping>

007.JPG

8.   Download java-properties-utils-1.7.1.jar

9.   Add the downloaded file to the NX_Root/bopcfg/www/CATALINA_BASE/shared/lib folder

008.JPG 

10.  Save the modified WEB.XML file and restart the Tomcat process.

 009.JPG