How to enable CORS on a Websphere Application Server (WAS 8.5)

In case you have a little DNG Javascript embedded in a Webpage and you want to  access RTC (running in a different domain) , then you need CORS. The question is “how to enable it with WAS? It seems that WAS itself could not configured but the WAS Apps (i.e. ccm) could be. This means you have to change your web.xml files.

Another possibilty is the IHS Server running in front of a WAS Server. The IHS is often used as reverse Proxy. Until now I have to investigate that.

Back to WAS…I found the information at stackoverflow. BTW, Tomcat is a little bit easier to config…details are here.

Before we go to WAS config let me mentioned that you have to enable CORS inside your web app with:

       crossDomain: true,
        xhrFields: {
        withCredentials: true

Go to the installation directory of WAS and find the ccm (alias RTC)  location.

In my environment it is at: C:\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\clmserverNode01Cell\ccm_war.ear\ccm.war\WEB-INF Include the following lines inside web.xml



</filter> <filter-mapping>


<url-pattern>/*</url-pattern> </filter-mapping>

Add the jar files to your

C:\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\clmserverNode01Cell\ccm_war.ear\ccm.war\WEB-INF\lib folder

Restart “ccm” from the WAS console Bildschirmfoto 2015-01-07 um 18.21.28 Test it with (maybe you need to login to https://clmserver:9443/ccm before, because of the problems with the “self signed certificates” from ccm) and use https://clmserver:9443/ccm/rootservices

Bildschirmfoto 2015-01-07 um 18.24.25

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: