Reading clientside file from server program.

Hi …
We are new to vaadin.
We would like to read file from client, when a client access the server the files from the client side should transfer to server automatically.

Please suggest code snippet that run at server and access the client file.

Thanks and Regards


I don’t think this can be done due to security restrictions. It would be quite scary if a piece of code loaded from a web server could just access any of your files and send them back.

I think you have no other option than to have the user upload the file from the client.

Hi Teppo kurki,

        First Client Choose directory from his/her system, Can we transfer all files from that directory to server without choosing files from the client and withou clicking upload button.

Please suggest me, Is it possible.

Thank you and Regards.

HTML5 supports uploading an entire directory, but not all browsers may support it yet. At least Chrome does. Vaadin doesn’t support that currently, but at least it’s technically possible. Also, with HTML5 drag&drop, you should be able to upload entire folders in other browsers as well. I’m not sure if it’s possible with the current DragAndDropWrapper in Vaadin, it might require some special handling.

Other than that, as Teppo said, it is not allowed by browsers. There are such upload tools, but I think they normally use a trusted Java applet to handle the upload. That requires installing JRE on the client and having the users give rather dangerous rights to the applet, so I’d recommend against that at least in publicly available applications.

We dn’t have any problem for using applets in this problem.

Could you please suggest me some links to learn applets in vaadin. how to implement applets in vaadin for upload files from directory.

Thank you,

Can you please suggest me, how to upload files from the directory by using applet at the client end.
Thank you,


sorry, that’s not really my area of expertise. But I think you could find some good open-source solutions with a bit of googling. Integrating the applet to vaadin should not be difficult to do and there are numerous forum threads about it.

Perhaps someone else who has done this could chime in too?



AppletIntegration addon not support in vaadin7. Can we implement applet in vaadin7 without using appletIntegration addon? Plz Can you give some valuable suggetions.

Thank you,


there’s a community port of AppletIntegration to Vaadin 7.1 available at