[Yanel-dev] Extend Yanel by own servlets
Michael Wechner
michael.wechner at wyona.com
Mon Apr 3 03:14:05 EDT 2017
Hi Balz
Ok, let's meet for lunch first :-)
What would be a good date/time? What about tomorrow or this Thursday?
Thanks
Michael
Am 03.04.17 um 08:46 schrieb basZero:
> Hi Michael,
> yes, my usecase is: upload multiple images in one request (multipart).
> If we manage to find time to work on it together, that's fine.
> However I believe it would be the best to discuss during lunch and
> then work remotely (with pull requests).
> Cheers, Balz
>
> On Thu, Mar 30, 2017 at 1:57 PM, Michael Wechner
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
> Hi Balz
>
> I am not sure currently how to do this best.
>
> What about doing together a short hackthon?
>
> I am currently working on various REST interfaces for Yulup
>
> https://www.yulup.com/en/documentation/swagger-ui/index.html
> <https://www.yulup.com/en/documentation/swagger-ui/index.html>
>
> and I would like to add more interfaces and would be to upload
> multiple images with one request, which I guess would also be your
> usecase, right? Or what is your usecase?
>
> Thanks
>
> Michael
>
>
> Am 28.03.17 um 17:35 schrieb basZero:
>> Hi,
>>
>> I want to extend my realm by a resource that can handle multipart
>> POST requests according to the Servlet Spec 3.0.
>>
>> In order to make use of the Servlet 3.0 features, the servlet
>> class must be annotated by @MultipartConfig, e.g.
>>
>> @MultipartConfig
>> public class YanelMultipartServlet extends HttpServlet {
>> ...
>> }
>>
>> Currently I think everything is mapped to the YanelServlet in web.xml
>>
>> My question is: how should I extend Yanel?
>> What probably has to be done:
>>
>> - Somehow extend web.xml so that a certain realm path gets mapped
>> to the new YanelMultipartServlet
>> - Maybe YanelMultipartServlet can be a subclass of YanelServlet,
>> which then would find out the mapped resource and the processing
>> of the request could still be done in the resource.
>>
>> So, how should I do this?
>>
>> Use Case why I need this:
>> in Servlet 3.0 you can easily process all parts in a multipart
>> request like this:
>> Collection<Part> parts = request.getParts();
>>
>> Then you can iterate over all parts.
>>
>> But the getParts() method only works correctly if the servlet is
>> annotated by @MultipartConfig
>>
>> Cheers, Balz
>>
>>
>>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> <mailto:Yanel-development at wyona.com>
> http://mx2.wyona.com/cgi-bin/mailman/listinfo/yanel-development
> <http://mx2.wyona.com/cgi-bin/mailman/listinfo/yanel-development>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mx2.wyona.com/pipermail/yanel-development/attachments/20170403/7c07f565/attachment-0001.html>
More information about the Yanel-development
mailing list