I use catch-all servlet and pass the request object along with other internal infrastructure classes. Its a way to develop my application. Reasons are beyond the scope of this issue.
@WebServlet(name="RequestHandler", urlPatterns="/*")
I am trying to download files from a browser using multipart-form-data:
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="file"/>
<input type="submit" name="videoUpload" value="Upload"/>
</form>
And the only way to transfer file data with the server is to annotate the servlet with:
@MultipartConfig
If I annotate my servlet-catch-all, everything works fine, but not very often, that I really need to use the file upload function.
Option 1: Leave him alone.
Do annotations leave unnecessary overhead, even if most queries don't use it?
2: ?
, multipart?
3: .
( , ...)?