I need to upload a file in a database using an input form in a JSP. I use EJB and my Entity has a file attribute declared as Blob, so I need to convert the file uploaded.
How can I do?
I’ve read similar questions but they didn’t help…
I need to upload a file in a database using an input form in
Share
JPA engines should be able to store a byte array (
byte[]) as a blob in the database. I would usebyte[]rather thanBlobfor your entity field.