Home > javafx > JavaFX + JSP

JavaFX + JSP


There were many queries related to integration of JavaFX with JSP or JSF. JavaFX is executed on client side, JSP & JSF resides on server, so “integration” in this context can be an overloaded term. Lets try one approach..

Its easy to just copy-paste all of those JavaFX launch script into your JSP. Another approach is to write a Custom Tag Library which will generate and embed the necessary code. JSP pages will use this tag library. This will allow to consolidate all JavaFX related code, customize the generation of JavaFX tags, pass additional arguments which are specific to your application.

A simple tld is shown here – javafx.tld – It accepts all parameters that are required to construct JavaFX applet tag as argument. You can pass additional arguments (in this case it passes User-Agent header information) to JavaFX Applet. The tag library is implemented by – JavaFXTag.java. It can be used as any other tag library as shown in – index.jsp. Rest of JavaFX – Server communication can be handled directly in JavaFX layer using AJAX like approach – REST WebServices – or directly invoking server technologies using JavaEE APIs

Its just a start, but I think it helps to consolidate and customize the “integration”..

Advertisements
Categories: javafx Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: