You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by frankie cevallos <fc...@yahoo.com> on 2002/08/01 01:38:51 UTC

Upload failure in MultipartValueStream

Hi all,

I just implemented file upload using Struts and am experiencing odd
behavior concerning plain text file uploads close 700Kb and above. My
development environment includes VAJ4, Struts 1.0, and am testing in VAJ's
WTE. The file upload works well for files less than 700Kb but throws the
following for anything larger:

java.io.IOException: end of stream before boundary found!
	java.lang.Throwable(java.lang.String)
	java.lang.Exception(java.lang.String)
	java.io.IOException(java.lang.String)
	org.apache.struts.upload.MultipartValueStream(java.io.InputStream,
java.lang.String)
	java.io.File org.apache.struts.upload.MultipartIterator.createLocalFile()
	org.apache.struts.upload.MultipartElement
org.apache.struts.upload.MultipartIterator.getNextElement()
	void
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet.http.HttpServletRequest)
==== snipped ===	
----------------------------------------
My ActionForm:

package org.frb.ny.idd.gui.forms;
public class BeneFileActionForm extends ActionForm {
	protected FormFile beneFile;
	protected String loadBenefilename;public
org.apache.struts.upload.FormFile getBeneFile() {
	return beneFile;
}
public java.lang.String getLoadBenefilename() {
	return loadBenefilename;
}
public void setBeneFile(org.apache.struts.upload.FormFile newBeneFile) {
	beneFile = newBeneFile;
}
public void setLoadBenefilename(java.lang.String newLoadBenefilename) {
	loadBenefilename = newLoadBenefilename;
}
}
----------------------------------------
My jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<SCRIPT language="JavaScript" src="/JavaScripts/util.js"></SCRIPT>
<SCRIPT language="JavaScript" src="/JavaScripts/LoadFile.js"></SCRIPT>

<html:form action="loadBene" enctype="multipart/form-data"
onsubmit="return confirmLoad()" >

		<html:hidden property="loadBenefilename" value="none"/> 
		Please enter the file to be loaded
		<BR>
		<html:file property="beneFile" />
	
		<html:submit value="Load"/>
		<html:button value="Cancel" property="cancel"
onclick="window.close();"/>

</html:form>
----------------------------------------

Does anyone know what could be causing this error? Besides some
javascript, there's not too much difference between this implementation
and the Struts example. 

Thanks so much in advance,
Frankie


=====

___________________
frankie cevallos
h) 212/316.2039
c) 646/773.7299   




__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>