This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes html:file tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:file tag" Watch "html:file tag" New topic
Author

html:file tag

Poorav Chaudhari
Ranch Hand

Joined: Sep 17, 2002
Posts: 50
I am building an application using tomcat and struts framework.
I am facing a strange problem in implementing html:file tag. under normal circumstances i am able to upload the file without any problems. now suppose i have a form of few other fields like text, checkbox, etc., and including the file field. If someone enters an invalid field. i do a server side validation and take the user back to the form page so that they can re-enter the invalid field. the rest of the field stay populated as expected but the file field becomes empty. which is not the behaviour i want. The file field should remain populated with the file i selected in my file open dialog box. is this a normal behaviour with html:file or am i missing something. My html file tag looks as follows.
<html:file property="resumeFile" name="resourceForm"/>


Poorav Chaudhari
no body
Greenhorn

Joined: Jun 05, 2003
Posts: 1
hi,
i have also same problem.
any 1 know the answer?
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
no body,
We don't have many rules at Javaranch, but our naming policy is one of them. Please read this policy and change your display name to comply with it if you wish to continue posting. Thanks.
You can change your display name here.


Matthew Phillips
sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
That is normal behaviour of html file tag.
Try sending selected location back to the form.
http://lists.w3.org/Archives/Public/www-html/1994Sep/0051.html
 
 
subject: html:file tag
 
Similar Threads
facing serious problem with struts html:file element
enctype="multipart/form-data" request.getParameter() issue
Uploading file
html:file tag
Action form is not populated while using html:form enctype="multipart/form-data"