I want to upload a file to my spring 3.0 applicatoin (created with roo).
I already have the following entity:
@Entity
@RooJavaBean
@RooToString
@RooEntity
public class SelniumFile {
@ManyToOne(targetEntity = ShowCase.class)
@JoinColumn
private ShowCase showcase;
@Lob
@Basic(fetch = FetchType.LAZY)
private byte[] file;
@NotNull
private String name;
}
But I am not sure how to implement it on the view/controller side. Can I freely mix spring-form tags like <form:input>
with normal tags like <input type=file ...>
?
I have seen the nice multipart upload section in the MVC-Documentation but still need a little help to apply it to my specific case.