How can I upload a file bigger than 2MB?,
August 14, 2007 at 11:04 PM
I got an error with follow message. Is there anybody knows how to solve this problem? When i upload a file smaller than 2MB, it works so well-!! Plea~~~~~se~~~~ help me. I wanna destroy my laptop now... ---------------------------------------- org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (5096543) exceeds the configured maximum (2097152) ----------------------------------------
I attache pieces of my code. ----------------------------------------- ## Struts.xml <interceptors>
## ActionClass.java private File photo;// Client side file private String photoContentType; // The content type of the file private String photoFileName; // Server side file name
public File getPhoto() { return photo; }
public void setPhoto(File upload) { this.photo = upload; }
public String getPhotoContentType() { return photoContentType; }
public void setPhotoContentType(String uploadContentType) { this.photoContentType = uploadContentType; }
public String getPhotoFileName() { return photoFileName; }
public void setPhotoFileName(String uploadFileName) { this.photoFileName = uploadFileName; } ...........