Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FormFile path gets reset during submit

 
Ajay Singh
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Basically i have a form which contains textfield,browse button for file uploading(FormFile class is used) and a submit button to submit the file data to the server. I am able to see the file data in the server.But the problem is that the full file path gets reset whenever i click the submit button after browsing the file.I want to retain the file path in that textfield.Can someone guide me.I am using Struts 1.1 tomcat 6.0.2 and JDK 1.5

Regards
Ajay
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Browsers do not maintain file input element filenames, nor can they be pre-loaded. This isn't an issue with Struts, but just the way browsers work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic