Skip to main content

process multipart/form-data request in a Filter

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
hzib
Offline
Joined: 2013-10-10

Hello,
I'm trying to process multipart/form-data requests in a Filter but it seems to be impossible to get the request parameters with HttpServletRequest#getParts() from outside an @MultipartConfig annotated servlet.
For Tomcat exists the allowCasualMultipartParsing attribute in the context.xml (see http://tomcat.apache.org/tomcat-7.0-doc/config/context.html) to allow access to the request parameters in a servlet which isn't marked with the @MultipartConfig annotation.

Is there a way to access the request parameters from a Filter in Glassfish?

Link to the original Tomcat issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=49711