It seems as though when using Tomcat ServletInputStream.readLine()  hangs at
the end of the request data for a while, I haven't experienced this hang
using a different servlet container. Can anyone else verify this?

-----Original Message-----
From: Schachter, Michael
To: '[EMAIL PROTECTED]'
Sent: 11/16/00 4:21 PM
Subject: RE: multipart requests

I'm currently investigating why it takes so long.  Apparently the
ServletInputStream.readLine() method is the culprit, but I'm not exactly
sure why as of yet.  Look for a fix within the next day.

-----Original Message-----
From: Sayles, Scott SAXONHQ
To: 'Schachter, Michael'
Cc: '[EMAIL PROTECTED]'
Sent: 11/16/00 3:16 PM
Subject: multipart requests

Michael,
Ya, I've checked it out.  It's nice that it's built in.  Although, I was
having problems with uploading relatively larger files (like 300k!).
For
some reason, the getNextElement() method for MultipartIterator was
taking
way too long.  I tried setting the buffer sizes to various sizes with no
significant changes.  I probably missed something about how to utilize
these
components.  Since I wasn't using implementing an action form for the
form,
the DiskMultipartRequestHandler(DMRH) never came into play from the form
processing.  I explicity utilized the handler in the action class and
set
the buffer sizes for both the iterator and the handler from 1 - 10Mb.
The
reason I did this was so that I could explicitly specify different
directories to write the file to based on the request (as opposed to the
one
defined in the servlet init-param).  I ended up using the
MultipartRequest
stuff from Oreilly and it works fine.  I know I could have done it
differently, but any thoughts on what problems there might have been?

Thanks

Scott
-----Original Message-----
From: Schachter, Michael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 16, 2000 2:58 PM
To: 'Sayles, Scott SAXONHQ '
Subject: RE: multipart requests / request attributes and forwarding


 Scott,

Although this isn't an answer to your question, have you checked out the
multipart request handling that's built into struts now?  All you have
to do
is create set and get methods of type "FormFile" in your ActionForm
class
and the proper form:file tags in your jsp for file uploading.

-----Original Message-----
From: Sayles, Scott SAXONHQ
To: '[EMAIL PROTECTED]'
Sent: 11/16/00 2:33 PM
Subject: multipart requests / request attributes and forwarding

Hello,

I'm facing a small dilema.  I've created a struts action class that
handles
requests for uploading files.  I'm creating some action errors using the
standard struts method in which the action errors are added to an action
errors object and is forwarded to a page that is using the
<struts:errors/>
tag.  When the request is forwarded to the page, the tag (I assume) is
not
able to handle the request attribute to get the errors.  It seems like
the
request attributes are not excluded from the multipart request format.
I'm
getting a "page cannot be displayed" meesage from the browser.  When I
take
out the tag, the page comes up fine.  I could probably just make a
single
specific error page or put the errors into the session scope, but
perhaps
there's a more elegant solution to handle this?  Perhaps, I'm missing
something?  Any thoughts?

Thanks

Scott

Reply via email to