You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Azariah Jeyakumar <az...@tumbleweed.com> on 2001/04/24 00:10:55 UTC

File upload problems

Hi,

We are using the file upload feature of struts heavily. We face the foll
problems:

1. I get "java.io.IOException: end of stream before boundary found!"
intermittently (full stack trace below). Roughly 1 out of 10 or 20 times I
submit the form that contains File upload. I have not been able to identify
a pattern when this exception happens. But I think the exception happens
only when no file is actually entered/uploaded.

To elaborate, my form has several Submit buttons. Only 1 of the submit
button expects the type=file field to have a valid file name. All other
submit buttons dont care about the field. When I click on one of these other
submit buttons, I get the above exception, intermittently.

2. The tag struts:multibox does not work well in a form that has
enctype=multipart/form-data. Only the last checkbox that I selected is set
in the multibox form field. I expect a comma separated list of the value of
all the selected checkboxes. This works in the form if I remove the enctype
attribute.

We use jakarta-struts-1.0-b1.

Thanks
Azariah


Full stack trace for first problem:
500 Servlet Exception
java.io.IOException: end of stream before boundary found!
at
org.apache.struts.upload.MultipartValueStream.<init>(MultipartValueStream.ja
va:65)
at
org.apache.struts.upload.MultipartIterator.createLocalFile(MultipartIterator
.java:469)
at
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
java:201)
at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:70)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:447)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:19
10)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:83)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:333)
at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:266
)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)