title: How to configure multipart in Grails?
body: <p>I'm using Servlet 3.0 and the <a href="https://grails.org/plugin/spring-security-rest" rel="nofollow">Spring Security REST plugin</a> in my Grails application. When I run the application in Glassfish and when the security plugin looks for the access token in a request, the following exception is thrown:</p>
  
  <pre><code>java.lang.IllegalStateException: Request.getParts is called without multipart configuration. Either add a @MultipartConfig to the servlet, or a multipart-config element to web.xml
  at org.apache.catalina.connector.Request.checkMultipartConfiguration(Request.java:4533)
  at org.apache.catalina.connector.Request.getParts(Request.java:4539)
  at org.apache.catalina.connector.RequestFacade.getParts(RequestFacade.java:1086)
  at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:375)
  at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:375)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
  at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:60)
  at groovy.lang.MetaBeanProperty$getProperty.call(Unknown Source)
  at org.codehaus.groovy.grails.plugins.web.ServletsGrailsPluginSupport$_enhanceServletApi_closure1.doCall(ServletsGrailsPluginSupport.groovy:38)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
  at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:81)
  at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1161)
  at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
  at org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:33)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:293)
  at grails.plugin.springsecurity.rest.token.bearer.BearerTokenReader.findToken(BearerTokenReader.groovy:47)
  </code></pre>
  
  <p>Where do I have to place the multipart configuration? </p>
  
  <p>I'm not uploading a file, so I guess I can't use the annotation. But there's also no web.xml in Grails.</p>
  
  <p>I'm using Grails 2.5.0 and GlassFish 4.1</p>
  
  <p>Thanks in advance!</p>