• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file upload from action

 
Nesrin aboud
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to upload a file,
I have the complete path on client side
and the server path also is ready to receive the uploaded file

but I do not know how to user the String path on client side.
I do not want to use the <c:file/> I want to use the path that I have directly


I found a sample of code using the PosMethod
can this work or not inside my Action

and how to set the path of client file into the it

 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay so you want to read a file on client's machine directly from your struts action?? This is not possible, you cannot read any file from the client's hard disk. The only way to do this is the browser sends the file to the server using <input type="file" /> (or <s:file> struts tag)...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is basically the same question that was already answered here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic