O'Reilly logo

JavaFX 1.2 Application Development Cookbook by Vladimir Vivien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Uploading files to servers with HttpRequest

When creating fully connected rich client applications, part of the expected standard functionalities, sometimes, is the ability to exchange files with the server. We have already seen how to download an image from the server (see recipe Downloading images with HttpRequest). In this recipe, we will look at how to use HttpRequest to upload an image to the server.

Getting ready

The concepts presented here deals with HTTP and the HttpRequest object in JavaFX. You should already have an understanding of the basic mechanics behind the Web and how HttpRequest interacts with web servers to handle the request/response life cycle. Refer to the recipes Accessing remote data with HttpRequest, Downloading images ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required