This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes how to read file which is on client machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to read file which is on client machine" Watch "how to read file which is on client machine" New topic
Author

how to read file which is on client machine

kirtesh jain
Ranch Hand

Joined: Nov 15, 2008
Posts: 44
hi ....
I am one Servlet where iam reading a file ....reading file is not a problem that function is working perfectly on my system ,....i wanted to know when this servlet is running on server how can i read a file which is located into client machine ...?
please help me out
thank you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41598
    
  55
You can't. If the servlet needs a file from the client file system, then you need to add a file upload capability to the web app. That's fairly easy to do with a library like Apache Commons FileUpload.


Ping & DNS - my free Android networking tools app
kirtesh jain
Ranch Hand

Joined: Nov 15, 2008
Posts: 44
Thanks for reply....
please can you tell me more abt....
once again thank you...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41598
    
  55
Start here: FileUpload
 
 
subject: how to read file which is on client machine