File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<html:file> tag?" Watch "<html:file> tag?" New topic
Author

<html:file> tag?

Mallik Avula
Ranch Hand

Joined: Nov 30, 2006
Posts: 86
Hi all,
i have a page where user can upload some images. for this i am using <html:file> tag and i am able to upload it into server. Everything is fine for now.
But when the user didn't fill a mandatory item and the page get back with errors, i want to show the file path in that box.
it is not showing the 'value' attribute content in the box.
How can i do it?
Please give some suggestions.



Thanks & Regards<br />Mallik Avula<br />SCJP1.4
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Sorry, but there's no way that I know of to do this. For security reasons, neither Firefox nor IE allow a server-side value to be defaulted in an <input type="file" > tag (which is what html:file gets rendered as). Think about it. If this were allowed, a malicious site could default the value of your Outlook file with all your names and addresses in it and have JavaScript submit the upload before you were even aware anything was happening.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <html:file> tag?