[Yanel-dev] Extend Yanel by own servlets

simon simon at 333.ch
Mon Apr 3 02:42:52 EDT 2017


Hi all

Am 30.03.2017 um 13:57 schrieb Michael Wechner:
> Hi Balz
>
> I am not sure currently how to do this best.
>
> What about doing together a short hackthon?
I think this would be a good idea.
>
> I am currently working on various REST interfaces for Yulup
>
> https://www.yulup.com/en/documentation/swagger-ui/index.html
I tried it again to get a DELETE request into  a resource but didn't get it.
>
> 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?
I think this would be nice for yanel anyways.

Cheers
Simon
>
> 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
>>
>>
>>
>
>
>


-- 
TEIL3
Vulkanstrasse 114
8048 Zürich

www.teil3.ch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mx2.wyona.com/pipermail/yanel-development/attachments/20170403/b642e037/attachment.html>


More information about the Yanel-development mailing list