aspose file tools*
The moose likes JavaFX and the fly likes How to embed JavaFX 2.0 application with jsp (to deploy it on server) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "How to embed JavaFX 2.0 application with jsp (to deploy it on server)" Watch "How to embed JavaFX 2.0 application with jsp (to deploy it on server)" New topic
Author

How to embed JavaFX 2.0 application with jsp (to deploy it on server)

maddy madhu
Greenhorn

Joined: Feb 08, 2012
Posts: 3
Hi All,

i am very new to JavaFX 2.0, i have downloaded the javaFX sdk and runtime and created standalone projects using eclipse IDE.

now i want to deploy these stand alone application in jboss server to give demo to my client, i tried so many ways but failed to deploy the application on server.

can any body tell me the steps how can i embed and deploy the javaFX 2.0 application on server.

the below one is my javaFX code.

Thanks in Advance
Maddy.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

You can embed it as an applet or even deploy it as a jnlp application. You can find more details here.


Mohamed Sanaulla | My Blog
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

And Welcome to Javaranch. Please UseCodeTags for posting your code. I have edited the post and added the code tags for you.
maddy madhu
Greenhorn

Joined: Feb 08, 2012
Posts: 3
Thank you very much Mohamed for quick reply.

i have tried to embed JavaFX application with applet code but it has thrown exception like its not an applet and can't be type cast some thing.

i dont know JNLP much but i have tried with sample code which are available on web but its giving jnlp error

my jnlp and jsp code is here:



can you please give me some sample code or tell me what is the problem in my code.

Thanks,
Maddy.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

The code in your last post is JavaFX 1.x, not JavaFX 2.0. Learn to tell the difference between a scripting language and a Java API.

Have you gone through the JavaFX 2.0 tutorials and documentation? There's a section on Deployment in the Browser.

edit I see Mohamed Sanaulla already gave you a link to the Deployment section of the same tutorial. Didn't you click the link and read the page?


luck, db
There are no new questions, but there may be new answers.
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 149
    
    9
You can refer to my answer to your question here: https://forums.oracle.com/forums/thread.jspa?threadID=2344301&tstart=15

I believe the last post by maddy was JavaScript not JavaFX script, but the embedding JavaScript does not like correctly uses the JavaFX deployment toolkit http://java.com/js/dtjava.js and provide an identified html div placeholder for the application as instructed in section 5 of the deployment guide referred to by Darryl.
maddy madhu
Greenhorn

Joined: Feb 08, 2012
Posts: 3
Thank you very much John,

i have changed jsp page to html page and instead of dtfx.js i am using dtjava.js
the below one is my html page


can you please help me on this.

Thanks,
Maddy.
Beryl Lin
Greenhorn

Joined: Oct 11, 2012
Posts: 1
Mohamed Sanaulla wrote:You can embed it as an applet or even deploy it as a jnlp application. You can find more details here.


Hi Sanaulla,
Would I ask that how can I embed javafx into jsp as an applet? I have got a "can't found javafx/application" error. I have make my javafx project into a jar file and put it under the WebContent.
Thank you very much.

Beryl
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1088
    
  10

Hi Beryl,
Welcome to the Ranch!

Mohamed has provided a link in his post. That points to the "Deploying JavaFX Applications" page. This has a section about "Deployment in Browser" - link
You might want to check out that.

Also, please create new topics for problems instead of replying back to other older posts. As you can see, the last post on this topic is many months old.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to embed JavaFX 2.0 application with jsp (to deploy it on server)