Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7723241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:23:34+00:00 2026-06-01T04:23:34+00:00

When using the WebEngine and WebView of JavaFX 2.0 to show some HTML content,

  • 0

When using the WebEngine and WebView of JavaFX 2.0 to show some HTML content, I’m not able to handle downloads from the HTML page at all. When I click on any downloadable link nothings happens at all.

Is it possible to handle downloads in JavaFX 2.0 WebView/WebEngine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:23:35+00:00Added an answer on June 1, 2026 at 4:23 am

    Download functionality is currently not implemented in WebView.
    You can implement it yourself by monitoring the location property of the WebView and then creating appropriate code to perform the download.

    webView.getEngine().locationProperty().addListener(new ChangeListener<String>() {
      @Override public void changed(ObservableValue<? extends String> observableValue, String oldLoc, String newLoc) {
        // check if the newLoc corresponds to a file you want to be downloadable
        // and if so trigger some code and dialogs to handle the download.
      }
    });
    

    An example of code to handle a download from JavaFX can be found in this zenjava blog entry. Edit: This blog page does not exist anymore. Here is the latest archive of this blog page.

    Downloads in web browsers are often triggered by http content-type or content-disposition headers and can be based upon a mime-type/file extension mapping. The above scheme will only work for a file extension mapping where the file extension is derived from the location. For handling downloads based on a content-type or content-disposition header you would likely need to implement your own java.net url connection handler.

    To get this functionality implemented in the core JavaFX libraries you could check the JavaFX Jira for a feature request around this and, if it is not there, create a new feature request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Java, how can I extract all the links from a given web page?
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using mercurial, I've run into an odd problem where a line from one committer
using a binary search tree I need to add to a vector all int
(Using MVC 2) From inside my controller action, I need to display the url:
Using C# How can I show a document in richtextbox without scrollbars, But I
Using php's DOMDocument->LoadHTMLFile('test.html'); keeps on returning an error to me, reporting for an error
Using Visual Studio / C#, I've been debugging some nunit tests recently, and am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.