I have my javaFX application running on a web server (wamp) and the client access to this app by a browser. I want to create an xml file on the server side. How can i do that? Because at the moment if i use a path for example “/Users/username/Desktop” it will create the file on the client Desktop. I want to create this file on the server desktop.
I’m using javaFX 2.2 on netbeans 7.2.1
Sorry for my bad English! Thank you!
Looks like wamp is a php based server. In which case the server component will need some php script to handle the upload. w3schools has a sample script for uploading via php (I don’t endorse this script, as I have never used it nor php – I just offer it as a reference).
The w3schools tutorial for file upload uses html to post file data to the server. With JavaFX you will instead code the file post in Java. The Java portion in the JavaFX client will need use a multi-part form post to send the file from the client to the server. Something like the apache httpclient is able to do this. There is sample code for an end to end solution in this post: How to upload a file using Java HttpClient library working with PHP.