Home Tutorialhelp Comment How can i upload a file bigger than 2MB file?

 
 

Comment

Kim
How can i upload a file bigger than 2MB file?,
August 14, 2007 at 11:00 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>

<interceptor-stack name="authenticationStack">
<interceptor-ref name="fileUpload">
<param name="allowedTypes">
image/*
</param>
<param name="maximumSize">
1024000000
</param>
</interceptor-ref>
<interceptor-ref name="basicStack"/>
</interceptor-stack>

</interceptors>

<action name="RegisterUser" class="authentication.RegisterUser">
<interceptor-ref name="authenticationStack"></interceptor-ref>
............

## InputForm.jsp
<s:file name="photo" label="%{getText('user.photo')}" accept="image/*" />

## 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;
}
...........

-----------------------------------------

Thanks...
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Struts Questions

Struts 2 File Upload error
 

Struts Questions

File Upload in struts2 - Invalid field value for field
 

Struts Examples

Struts 2 File Upload
 

Framework Questions

Struts upload file - Framework
 

Struts Questions

Struts File Upload Example - Struts
 

Struts Questions

Multiple file upload - Struts
 

Struts Questions

struts2
 

Struts Questions

File Upload in Struts.
 

Java Beginners

struts2 upload image public_html
 

PHP Questions

How to Increase Upload File Size Limit in php
 

Struts Questions

Based on struts Upload - Struts
 

Struts Questions

Struts(1.3) action code for file upload
 

Ajax Questions

retrieve in xml file in struts2
 

Struts Questions

java file upload in struts - Struts
 

Framework Questions

STRUTS2
 

PHP Questions

Multiple File Upload in PHP
 

Struts Questions

Struts2
 

Struts Questions

struts property file query
 

Struts Questions

struts2 properties file
 

Struts Questions

tree tag in struts2 - Struts
 

Subversion Questions

more than one struts-config.xml file
 

Struts Questions

Achor tag. Struts2 code - Struts
 

Java Beginners

java code to upload and download a file - Java Beginners
 

Struts Questions

upload the pdf file only - Struts
 

Struts Questions

Achor tag. Struts2 code - Struts
 

Struts Questions

upload only pdf file - Struts
 

J2EE

File Upload Servlet 3.0 Example
 

JSP Servlet Questions

How I Upload File and Store that file name in Database using JSP
 

Struts Questions

Struts file uploading - Struts
 

Struts Questions

Struts Test case for File Upload - Struts
 

Struts Questions

Struts2 - Struts
 

Struts Questions

struts2
 

Java Beginners

struts2
 

Spring Framework Questions

tutorial for file upload in spring - Spring
 

JDBC Questions

How to create d db for upload files using bolb i m followin dat upload file in db tutorial
 

Struts Questions

file download in struts - Struts
 

JSP Servlet Questions

Upload file with ather Fieldn
 

IDE Questions

How I can filling pdf file that crated by livecycle using itext
 

Java Beginners

How to upload file on FTP Server
 

Java Beginners

image file upload to a web server
 

Java Technology Tutorials

FTP File Upload in Java
 

JSP Interview Questions

File upload in JSP
 

JSP Servlet Questions

File Upload
 

Java Beginners

How to upload and save a file in a folder - Java Beginners
 

Java Beginners

Java upload file to ftp
 

Struts Examples

Struts File Upload and Save
 

Struts 2 Tutorials

Struts2.2.1 file upload example.
 

JSP Servlet Questions

File upload - JSP-Servlet
 

IoC Questions

how to write greater than symbol in a file using java
 

JSP Servlet Questions

How i upload file and save that record in database using JSP?
 

Java Interview Questions

how do i upload a file by using servlet or jsp?
 

JSP Servlet Questions

File upload - JSP-Servlet
 

JSP Servlet Questions

File Upload and Down load - JSP-Servlet
 

JSP Servlet Questions

How to upload file using JSP?
 

JDBC Questions

how can i export a .jar file include .mbd file?
 

WebSevices Questions

zip file upload in php - WebSevices
 

Struts Questions

How to Use Struts 2 token tag - Struts
 

Struts-Tutorials

Struts Configuration file - struts.xml
 

PHP Questions

File Upload
 

JSP Servlet Questions

file upload
 

Struts Questions

multiple configurstion file in struts - Struts
 

Java Magazine Questions

code to upload and download a file - Java Magazine
 

Struts Questions

Struts2 tags - Struts
 

Struts 2 Tutorials

Create JSP file
 

Framework Questions

struts2 - Framework
 

Struts Questions

Source file upload by attaching multiple files
 

Spring Framework

Spring 2.5 MVC File Upload
 

Struts Questions

Getting path name of uploading file in struts 2.8.1
 

JSP Tutorials

Struts File Upload Example
 

Struts Questions

using displaytag with struts2 - Struts
 

Java Beginners

how to upload file using FTP in java
 

Struts Questions

Struts2 - Struts
 

Struts 2 Tutorials

File Tag (Form Tag) Example
 

Java Beginners

How to write more than 65536 rows in single excel file but more than 1 sheets?
 

Struts Questions

tiles 2 with struts2 - Struts
 

Struts Questions

struts2 - Struts
 

Struts 2 Tutorials

How to create pdf file in struts2.
 

Java Beginners

Java FTP file upload example
 

JavaScript Questions

Upload file without brouse button
 

Struts Questions

Struts file downloading - Struts
 

Struts Questions

Excel File data upload into postgresql database in struts 1.x
 

Struts Questions

Struts2 and Hibernate
 

Struts Questions

Still have the same problem--First Example of Struts2 - Struts
 

JSP Servlet Questions

File Upload in FTP - JSP-Servlet
 

Spring Framework Questions

file upload in spring 2.5 - Spring
 

Java Beginners

how can create a jar file - Java Beginners
 

Java Beginners

upload and download a file - Java Beginners
 

Struts Questions

Struts2 ComponentTagSupport - Struts
 

JSP Servlet Questions

file upload error - JSP-Servlet
 

JSP Servlet Questions

How display a Image on Servlet from file upload - JSP-Servlet
 

JDBC Questions

How to create d db for upload files using bolb i m followin dat upload file in db tutorial
 

JSP Interview Questions

jsp upload file to server
 

JSP Servlet Questions

How to upload a large excel file - JSP-Servlet
 

JSP Servlet Questions

How display a image on servlet from file upload - JSP-Servlet
 

Java Beginners

how to send my system.out.println in a class file to a jsp in Struts2
 

Mobile Applications Questions

how can i open pdf file in assest folder in android application?
 

Framework Questions

datetimepicker not working in struts2
 

Framework Questions

upload a file - Framework
 

Java Beginners

How can i read a file from nth line onwards in java
 

Ajax

AJAX file upload
 

Advertisements Advertisements
 

 

 

DMCA.com