JavaFX within WebSpace Portlets


I am attending a WebSpace bootcamp this week, which gives me some extra time to discover Sun’s new Identity Based Content Portal.

I couldn’t resist to try to deploy my JavaFX PieChart application in a JSR 268 portlet.

Here is the result


Here are a few caveats / things to know

  • Use NetBeans’ project properties on the JavaFX side to generate the required HTML and proper embedding of the JavaFX librairies. Choose “Run” category, then specify “Run in a browser”. This will generate the HTML for you

  • Create a Web Application / JSR 268 Portlet project and copy/paste the HTML from the previous step to the portlet view JSP

  • Deploy the WAR file using Web Space admin tool (the web based Control Panel – Plugin Installer)

  • Add the portlet to an organization / community / user page.

Be careful about the path to your JAR file, it must be downloadable from your client browser. WebSpace overwrites the main context-root “/” and redirects everything to its own pages. I was lazy and just pointed to a file:/// URL 🙁

Have Fun !


,

  1. #1 by Steffen Schuler on 09/03/2009 - 14:20

    I tried to develop a similar portlet, and the generatet html works fine. But it is somehow not easy to access to javafx jar resource from within a portlet…

    I’am really looking forward to get hands on a real JavaFXPortlet.

(will not be published)