How to get full file path

How to get full file path using Vaddin Upload component.

Please anybody help me…

Do you mean the full file path of the “original” location of the file on the remote computer ?

There is no way to get this, since the web browsers don’t send that information to the server.
Some older IE browsers did incorrectly send the full path+filename in file uploads, but all
modern browsers don’t send this information to the server.

Why would you want it?

You can read the byte stream and write it to a file, db etc

There is one problem in that. In the stream function we need to specify exaclty from where the file is being uploaded.
Arun , even I am having the same problem. If you have figured out the solution to this problem please get back to me as soon as possible.
Thanks.

In general, this is not possible from JavaScript for security reasons, and the client side parts of Vaadin are executed as JavaScript. Some older versions of certain browsers might send the information to the server, but in doing so they are going against what the standard says.

There are several other threads on the forum about this with more information. Effectively, you’d need a native plug-in on the browser (e.g. Flash or Java Applet) to get hold of such information.

Hey hi Henry.
I am trying to upload components with some time delay using Thread.sleep(1000). But I am getting the following error

Exception in thread “Thread-16” java.lang.IllegalStateException: A connector should not be marked as dirty while a response is being written.
at com.vaadin.ui.ConnectorTracker.markDirty(ConnectorTracker.java:397)
at com.vaadin.server.AbstractClientConnector.markAsDirty(AbstractClientConnector.java:138)
at com.vaadin.server.AbstractClientConnector.attach(AbstractClientConnector.java:576)
at com.vaadin.ui.AbstractComponent.attach(AbstractComponent.java:572)
at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:479)
at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:215)
at com.vaadin.ui.AbstractOrderedLayout.addComponent(AbstractOrderedLayout.java:85)
at com.example.dmscustomcomponents.DmscustomcomponentsUI$1.run(DmscustomcomponentsUI.java:47)
at java.lang.Thread.run(Thread.java:722)

I think that when i run my vaadin project on the apache server and when the page loads up it computes everything before thread.sleep method and ignore everything after that.
Why is this happening ?
Can you help me with this please.

If you are accessing Vaadin components from a background thread, you need to use correct locking (usually with UI.access()) and typically also push/polling.
See
Book of Vaadin
.