<div dir="ltr">Hi,<div><br></div><div>I want to extend my realm by a resource that can handle multipart POST requests according to the Servlet Spec 3.0.</div><div><br></div><div>In order to make use of the Servlet 3.0 features, the servlet class must be annotated by @MultipartConfig, e.g.</div><div><br></div><div><div>@MultipartConfig</div><div>public class YanelMultipartServlet extends HttpServlet {</div></div><div>  ...</div><div>}</div><div><br></div><div>Currently I think everything is mapped to the YanelServlet in web.xml</div><div><br></div><div>My question is: how should I extend Yanel?</div><div>What probably has to be done:</div><div><br></div><div>- Somehow extend web.xml so that a certain realm path gets mapped to the new YanelMultipartServlet</div><div>- 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.</div><div><br></div><div>So, how should I do this?</div><div><br></div><div>Use Case why I need this:</div><div>in Servlet 3.0 you can easily process all parts in a multipart request like this:</div><div>Collection<Part> parts = request.getParts();<br></div><div><br></div><div>Then you can iterate over all parts.</div><div><br></div><div>But the getParts() method only works correctly if the servlet is annotated by @MultipartConfig</div><div><br></div><div>Cheers, Balz</div><div><br></div></div>