[jboss-user] [JBoss Seam] - File upload to application folder

damatrix do-not-reply at jboss.com
Mon Jul 30 05:02:46 EDT 2007


Hi,

I have an s:fileUpload control that i use to upload an image file to a directory in my application under the name "img". 

However when i try to save the uploaded file to that folder i get a FileNotFoundException. I know this is not Seam specific, but i still get the same error even if i use the FacesContext i.e. i use it to get access to the ExternalContext and subsequently to the request path of the folder i want to write to. I even tried to use the org.jboss.seam.util.Resources getResource method, which gets me a URL, but i still am not able to write to that URL.

Can anybody whip up some code on how exactly i can write the byte data i upload to the folder. I'll be very grateful.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068638#4068638

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068638



More information about the jboss-user mailing list