• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get file path in Struts file upload tag

 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to get the path of the file being uploaded. Thanks.
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Struts are you using?? Is it Struts 1.x or Struts 2.x??
 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote:Which version of Struts are you using?? Is it Struts 1.x or Struts 2.x??

I am using struts 2. Sorry,i should have mentioned it in the original question.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Path of which file? The local file? Or client file?

There's no way to get the path on the client in a reliable cross-browser way: what is sent depends on the browser. Some send only the filename (correct behavior), some send the entire path (security exposure).
 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:Path of which file? The local file? Or client file?

There's no way to get the path on the client in a reliable cross-browser way: what is sent depends on the browser. Some send only the filename (correct behavior), some send the entire path (security exposure).


Oh.ok.I wanted the path of client file. I know how to get the file path of the local file. Thanks:)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic