Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
Configuration block needs to be encoded
Solution:
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. 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://<server>:<port>/spotfire/wp/ViewAnalysis.aspx?file=/BASEBALL&configurationBlock="+encodeURIComponent(uri); document.getElementById("demo").innerHTML = res; } </script> </body> </html>Wiki: Create a Configuration Block in TIBCO Spotfire® External: Tomcat bug Doc: encodeuricomponent function Doc: encodeuri function
Comments
0 comments
Article is closed for comments.