Search results

Building dashboard app with Java Servlets

We have created the sample java application along with Javascript to embed the Bold BI Dashboard. Here, we could set the sever and dashboard details as the embed details then the dashboard will be rendered after passing the authorization.

NOTE: The best way to get started would be reading the Getting Started section of the documentation. It will give you enough information that you need to know before working on the sample.

How to run the sample

  1. Please download the Java Servlet project from this link.

  2. You need to set your embed property details in the index.jsp and Embed Properties in Index Embed Properties in API

    SiteIdentifier For Bold BI Enterprise edition, it should be like `site/site1`. For Bold BI Cloud, it should be empty string.
    RootUrl Dashboard Server BI URL (ex: http://localhost:5000/bi,
    AuthorizationUrl Url of the GetDetails action in the Go application(http://localhost:8086/getDetails). Learn more about authorize server [here](/embedded-bi/javascript-based/authorize-server/)
    Environment Your Bold BI application environment. (If Cloud, you should use `cloud`, if Enterprise, you should use `onpremise`)
    DashboardId Set the item id of the dashboard to embed from BI server.
    UserEmail UserEmail of the Admin in your Bold BI, which would be used to get the dashboard details from the BI server
    EmbedSecret You could get your EmbedSecret key from Embed tab by enabling `Enable embed authentication` in Administration page as shown below
  1. You could get the item id of the dashboard from the BI server. Please refer to this link and the following screenshot.
    Get Dashboard Id

  2. You can get your Embed Secret key from the administrator setting section. Please refer to this link for more details.

  3. Then, run your Java Servlet project.

How this sample works

  1. Based on the dashboardId provided in the index.jsp, we would authorize the server by calling the doPost function using the AuthorizeURL(http://localhost:8080/BoldBIEmbed/ with the provided EmbedProperties values.
    Get Embed Details

  2. In the above authorization, we have generated the SignatureURL with the provided EmbedSecret key and embed details which can be validated in the Bold BI Server API and returns the token. Based on the returned token, the dashboard will be started to render in index.jsp.

  3. In index.jsp, you can change the dashboard Id of the respective dashboard based on your requirement. Set Dashboard Id