• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 387
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic