hi all
Actually i want to upload more than 500 mb file using struts file upload features.
I have successfully upload the file less than 200 mb.
I have increase the java heap size and tomcat heap size in catalina.bat file and in myeclipse also.
i have also set java_opts and catalina_opts in environment variable.
i have also set in controller class in struts-config.xml file as
<controller maxFileSize="1G" nocache="true" bufferSize="1073741824"/>
i changed the server.xml file and web.xml file as you suggested.
In conf\server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxPostSize="67589953" />
In webapps\manager\WEB-INF\web.xml
<multipart-config>
<!-- 52MB max -->
<max-file-size>52428800</max-file-size>
<max-request-size>52428800</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>
but still i get this problem while uploading more than 250 mb files.
java.lang.OutOfMemoryError
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java: 177)
at org.apache.commons.fileupload.disk.DiskFileItem.ge t(DiskFileItem.java:308)
at org.apache.struts.upload.CommonsMultipartRequestHa ndler$CommonsFormFile.getFileData(CommonsMultipart RequestHandler.java:600)
at actions.FileUploadAction.execute(FileUploadAction. java:44)
at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
pls suggest me what i have to do to solve this problem.