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

 
 

Comment

Kim
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>

<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
 

Framework Questions

Struts upload file - Framework
 

Struts Questions

Based on struts Upload - Struts
 

Struts Questions

Struts File Upload Example - Struts
 

Struts Examples

Struts 2 File Upload
 

Struts Questions

File Upload in Struts.
 

Struts Questions

Multiple file upload - Struts
 

Java Beginners

struts2 upload image public_html
 

Struts Questions

java file upload in struts - Struts
 

Struts Questions

upload only pdf file - Struts
 

Struts Questions

Struts(1.3) action code for file upload
 

Struts Questions

File Upload in struts2 - Invalid field value for field
 

Struts Examples

Struts File Upload and Save
 

Struts Questions

upload the pdf file only - Struts
 

JSP Tutorials

Struts File Upload Example
 

Struts Questions

Struts Test case for File Upload - Struts
 

Struts Questions

tiles 2 with struts2 - Struts
 

Struts 2 Tutorials

Introduction to Struts 2 Framework
 

Java Beginners

java code to upload and download a file - Java Beginners
 

PHP Questions

Multiple File Upload in PHP
 

Struts Examples

Struts 2 Training
 

Struts Questions

Struts file uploading - Struts
 

Struts Questions

struts2 - Struts
 

Java Beginners

image file upload to a web server
 

JSP Servlet Questions

File upload - JSP-Servlet
 

Struts 2 Tutorials

Interceptors in Struts 2
 

Struts Questions

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

Java Technology Tutorials

FTP File Upload in Java
 

Struts Questions

image upload - Struts
 

Mobile Applications Questions

Upload image
 

JSP Servlet Questions

How to upload file using JSP?
 

JSP Servlet Questions

upload a image
 

JSP Servlet Questions

File Upload
 

Struts Questions

Source file upload by attaching multiple files
 

JSP Servlet Questions

Upload file with ather Fieldn
 

Struts Questions

struts property file query
 

PHP Questions

How to Increase Upload File Size Limit in php
 

J2EE

File Upload Servlet 3.0 Example
 

Java Beginners

upload and download a file - Java Beginners
 

Struts Questions

struts2 properties file
 

JSP Interview Questions

File upload in JSP
 

Spring Framework

Spring 2.5 MVC File Upload
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Development process Questions

How to upload multiple images in java(struts) using jsp?
 

Development process Questions

How to upload multiple images in java(struts) using jsp?
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Struts Questions

How to upload multiple images in java(struts) using jsp?
 

Spring Framework Questions

tutorial for file upload in spring - Spring
 

Java Beginners

Java upload file to ftp
 

Struts Examples

Introduction to Struts 2
 

Java Beginners

How to upload file on FTP Server
 

WebSevices Questions

zip file upload in php - WebSevices
 

JSP Interview Questions

file upload using JSP
 

PHP Questions

File Upload
 

JSP Servlet Questions

file upload
 

JSP Servlet Questions

File upload - JSP-Servlet
 

Subversion Questions

more than one struts-config.xml file
 

Struts Questions

uploadfile - Struts
 

Struts Questions

Struts2
 

JSP Servlet Questions

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

Framework Questions

Struts 2
 

JSP Servlet Questions

file upload and insert name into database - JSP-Servlet
 

JDBC Questions

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

JSP Servlet Questions

How to upload a large excel file - JSP-Servlet
 

JSP Servlet Questions

how to upload a file - JSP-Servlet
 

Struts Questions

file download in struts - Struts
 

JDBC Questions

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

JSP Servlet Questions

File Upload and Down load - JSP-Servlet
 

Java Beginners

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

Struts Questions

How to Use Struts 2 token tag - Struts
 

JSP Servlet Questions

upload image
 

Struts Questions

Getting path name of uploading file in struts 2.8.1
 

Struts Questions

struts
 

Struts Examples

Detailed introduction to Struts 2 Architecture
 

Java Magazine Questions

code to upload and download a file - Java Magazine
 

Spring 3

Spring 3 MVC File Upload, Spring MVC File Upload
 

Struts Questions

struts2
 

Java Beginners

Java FTP file upload example
 

PHP Questions

PHP code for csv file upload into mysql
 

JavaScript Questions

Upload file without brouse button
 

JSP Servlet Questions

upload and download files - JSP-Servlet
 

Struts Questions

Struts - Struts
 

JSP Interview Questions

jsp upload file to server
 

Struts 2 Tutorials

Struts 2 Tutorials - Struts version 2.3.15.1
 

Java Beginners

how to upload file using FTP in java
 

JSP Servlet Questions

File Upload in FTP - JSP-Servlet
 

JSP Servlet Questions

how to upload and download images in java?
 

Java Beginners

file upload in jsp - Java Beginners
 

Struts Questions

PHOTO UPLOAD AND DISPLAY - Struts
 

Java Interview Questions

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

JSP Servlet Questions

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

Java Beginners

Upload photo - Java Beginners
 

Struts 2 Tutorials

What are Interceptors in Struts 2 and how do they work?
 

JSP Tutorials

To Upload and insert the file into Database with Current Date and Time In JSP
 

Spring Framework Questions

file upload in spring 2.5 - Spring
 

Struts Questions

multiple configurstion file in struts - Struts
 

Advertisements Advertisements
 

 

 

DMCA.com