Free community discussion board for IBM® WebSphere® Portal
and Lotus Web Content Management™
(WCM / ILWWCM / LWWCM / WWCM) products.
You are not logged in.
Hi!
I created an HTML component which contains a form, and references a jsp component.
The form contains text fields and a file upload field. The JSP component process the submitted data.
The JSP can read the submitted data if the enctype is not multipart/form-data.
But if I changed the enctype to multipart/form-data the request.getInputStream() doesn't contain anything.
Here's a snippet of the code:
InputStream input = request.getInputStream();
if (input != null) {
BufferedInputStream bis = new BufferedInputStream(input);
ByteArrayOutputStream buf = new ByteArrayOutputStream();
int result = bis.read();
while(result != -1) {
byte b = (byte)result;
buf.write(b);
result = bis.read();
}
out.println("content: " + buf.toString() + "<br />");
}
bis.read always return -1.
Please help.
Offline