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 – 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”..

About Rakesh Menon

12 Responses to JavaFX + JSP

  1. Pingback: JavaFX + JSP

  2. Pingback: JavaFX | | Desenvolvimento de Aplicativos Avançados para Internet | RIAs Java FX | Mobile | Desktop

  3. Haim says:

    hi, i m into JavaFX… yet… looking at what we can expect of HTML 5… don’t you feel that in the long run JavaFX, Flex and Silverlight will lose a growing share in favor of HTML 5… ?

  4. aloleary says:

    If we had JWebPane as initially promised there could be other interesting types of integration – we were really hoping for this…. would still love Sun/Oracle to pull this one out of the hat (JWebPane/JXWebPane)…

    • Rakesh Menon says:

      Tough one to respond.. I think this is less of technical and more of legal issue.. But again its just a guess.. You have to read this along with the “Disclaimer” on sidebar.. 🙂

      • aloleary says:

        True… I guess an official update is all everyone is looking for especially after BOF sessions on JWebPane last year. I can imagine the whole WebKit side of things introduces some interesting licensing issues.

  5. Pingback: uberVU - social comments

  6. Max says:

    We (Exadel) are working on JSF+JavaFX integration in Fiji project. The project is going to be hosted here: As of now, we have very similar support for Flash:

  7. Pingback: JavaFx com JSP | BLOG TreinaWeb

  8. Pingback: JavaFX + JSP « Java, JavaFX and beyond… | Source code bank

Leave a Reply

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

You are commenting using your 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: