Posts Tagged liferay
JavaFX within WebSpace Portlets
Posted by Sébastien Stormacq in Java on 25/02/2009
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 !