Configuration block needs to be encoded

Configuration block needs to be encoded

book

Article ID: KB0080775

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.9 and above

Description

In TIBCO Spotfire versions prior to Spotfire 7.9, TIBCO Spotfire WebPlayer used to convert the analysis URL into encoded format when passing configuration block with the analysis URL. But in versions later than TIBCO Spotfire 7.9, few characters like = { } etc. are not getting encoded when passing configuration block with the analysis URL. As a result, analysis does not open using configuration block.

Issue/Introduction

This section describes how configuration block needs to be configured

Resolution

This is due to a defect which was introduced in version 8.5 of Tomcat. So passing configuration block using simple text will not work and the configuration block portion of the URL will need to be fully encoded like below: The simple text analysis URL containing configuration block can also be encoded through javascript functions like encodeURI and encodeURIcomponent before passing it to final analysis URL in TextArea.
<!DOCTYPE html>
<html>
<body>

<p>Click the button to encode a URI.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var uri = "documentProperty=\"value\";SetFilter(tableName=\"Baseball\",columnName=\"ASSISTS\",values=10);";
    var res = "http://&lt;server&gt;:&lt;port&gt;/spotfire/wp/ViewAnalysis.aspx?file=/BASEBALL&configurationBlock="+encodeURIComponent(uri);
    document.getElementById("demo").innerHTML = res;
}
</script>

</body>
</html>

Additional Information

Wiki: Create a Configuration Block in TIBCO Spotfire® External: Tomcat bug Doc: encodeuricomponent function Doc: encodeuri function