• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File upload using html:file

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!
I�m uploading a file to the database, and it works ok. I click on it, select the file, and the path is on the text area. But when I get the record, the text area is blank. How can I put the name of the file there?

in the jsp:
<html:file property="${nameForm.map.name}[${lineNumber-1}].formFile" styleClass="text" size="35"/>

thanks!
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While the HTML 4.0.1 specification says that a browser "may" display a default value in a file upload control, neither Internet Explorer nor Firefox will do so.

It's considered a security risk. Think about it: If a malevolent website wanted to upload information from your computer, all they'd have to do is set a default for say, your outlook address file, and then use JavaScript to submit the form automatically. As far as I know, there's no way to set a default upload file.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic