Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
maddy madhu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can embed it as an applet or even deploy it as a jnlp application. You can find more details here.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
John Damien Smith
Ranch Hand
Posts: 296
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic