Corda.com

 

Java Server Pages (PopChart)

< BACK TO QUICK START INDEX

These instructions will help you deploy a simple bar graph in a JSP application on your Java / J2EE Application Server. These instructions are somewhat abbreviated. If you would like a more detailed tutorial, view the JSP Quick Start in the PopChart Getting Started manual.

These instructions assume you are installing Corda Server on the same machine as your Java / J2EE Application Server. If you are serving JSPs from a different machine, these instructions may not work, or you may have to make adjustments.

  1. Download and Install Corda Server.
  2. Click here to download.

  3. Start Corda Builder.
  4. Select Start Menu > Corda 6.0 > Corda Builder (Click Cancel when the Wizard opens).

  5. Open the examples/apfiles/bar.pcxml file.

    This example appearance file is installed with PopChart. To open it, select File > Open, then choose ../examples/apfiles/bar.pcxml.

  6. Generate sample JSP code for this appearance file.
  7. Select the Sample Code tab from the bottom left corner. Then select JSP (Java Embedder) from the Code for pull-down menu.

  8. Save the code as popchart.jsp to your web application server.
  9. To save, click on Save Code to File button.

  10. Install the Java version of the Corda Embedder
  11. This is usually accomplished by copying Corda60/dev_tools/embedder/java/CordaEmbedder.jar to your web application's WEB-INF/lib directory and restarting your server. For details, refer to the Corda documentation.

  12. Start Corda Server.
  13. Select Start Menu > Corda 6.0 > Corda Server.

  14. Browse to the popchart.jsp file in your web browser.
  15. If you saved the file to the root of your web server, you can browse to it by entering http://localhost:8080/popchart.jsp in a browser.

  16. You should see a bar graph in your browser.

Now you can customize your graph and connect to data on the fly by editing the popchart.jsp file. On our website you'll find a number of example JSP applications, including code for connecting to a database: