[Yanel-dev] Extend Yanel by own servlets

Michael Wechner michael.wechner at wyona.com
Thu Mar 30 07:57:21 EDT 2017


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

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

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


More information about the Yanel-development mailing list