On 20/01/2011 23:23, Christopher Schultz wrote:
> Mark,
> 
> On 1/20/2011 5:24 PM, Mark Thomas wrote:
>> On 20/01/2011 22:10, Christopher Schultz wrote:
>>> All,
>>>
>>> I'm working on a patch for allowing multipart parsing when a servlet
>>> doesn't have the @MultipartConfig annotation but I'm having trouble
>>> testing the case where the servlet *does* have the annotation.
> 
>> And the winner is...
> 
>>> 2. Tomcat doesn't scan for @MultipartConfig when programmatically
>>> registering servlets (does it?)
> 
>> at least not when using the embedded interface like that it doesn't.
> 
>> You need to do something like:
> 
>> Wrapper w = Tomcat.addServlet(...)
>> w.setsetMultipartConfigElement(...)
> 
> Thanks, but I'm still not getting the part I expect. :(
> 
> I'm starting to dig down into the code for FileUploadBase and friends
> but maybe you can help me short-circuit a bit: does getParts only return
> multipart/form-data parts that are actually file uploads? The javadoc
> doesn't say anything except that all parts are available via the
> getParts method.
> 
> I happen, for the sake of simplicity, to be using a non-file multipart
> part. Could that be confusing things?

It may well be. The parts are expected to be files (AFAICR).

The code is just a package renamed import of Commons File Upload with a
thin wrapper around it to map it to the servlet API.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to