Hi,
I'm wondering if the DiskFileUpload.parseRequest method
is thread-safe. I'm planning on using it along these
lines, and would like to know if it would work:
private static DiskFileUpload parser = null;
public doPost(HttpServletRequest request,
HttpServletResponse response) {
if (parser == null) {
...initialize on first call...
}
try {
list = parser.parseRequest(request);
...
} catch (FileUploadException e) {
...
}
}
Basically I'd like to have a single instance of
DiskFileUpload, in order to save me from some
repetitive object creation and configuration. Also,
what would happen if the setX() methods were to be
called while parsing a request? (I guess it would be
better to create a new object in that case, but I'm
curious.)
I couldn't find any answers in either the JavaDocs or
in the mailing list. Now, searching for "thread" in a
mailing list archive wasn't such a good idea... :-)
Cheers,
/Per
--
Per Cederberg, Software Consultant
http://www.percederberg.net/software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]