I have succeed to upload a few files using s:file tag, but how can i edit this page ? when i edit, s:file display nothing ,so if i submit ,the file field can just upload null. Do i need to choose files again even I don't want to change the file field ? thanks [ October 20, 2008: Message edited by: yuxh yuxh ]
sorry for my poor English, you just misunderstood "edit". In my a.jsp :
it's fine to upload and submit this page(I store the files in a dir,and put their names in database). Then I want to edit this page, I just want to edit the "title1" field but the "photoAddress" field is blank now, how can I submit without affecting the "photoAddress" that has been stored.By the way ,i use array to deal with this two file .
First of all if your tag like <s:file name ="photoAddress" /> same for both file tag. Yes that's true if you use array for file then you have to specify index for edit.Here when you edit for file name photoAddress is same that's why it is blank each time of edit.
As a security measure, most browsers including Firefox, IE, and Safari all do not allow a server-side value to be defaulted in an <input type=file> tag. It is therefore not possible to set a default value using the s:file tag as it is eventually rendered as an <input type=file> tag.
This link Explains it. [ October 21, 2008: Message edited by: Merrill Higginson ]
Please check your private messages for a message regarding an important administrative matter. You can do so by clicking My Private Messages in the upper right corner of the page.
Joined: Oct 20, 2008
hi,Nishan thank you for your reply ,but I think there is something wrong with "blank" and Merrill had explained it. finally ,i use onclick and js to judge whether the file has been changed(of course,it's not perfect ：） thanks..by the way ,it's difficult to work out a name [ October 21, 2008: Message edited by: yuxh yuxh ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com