Thank you for answer.

I just registered a jira account, but seems that I have no permissions to
create a new tasks. 

Regarding my question: 
I annotate class with @MultipartConfig and try to use inside doPost() method
getPart(String name) method and gets an exception: 
java.lang.IllegalStateException: No multipart config for servlet
        at org.eclipse.jetty.server.Request.getParts(Request.java:2061)
        at org.eclipse.jetty.server.Request.getPart(Request.java:2043)
        at
ru.kamis.test.samplewebapp.MultipartServletTest.doPost(MultipartServletTest.java:25)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)

Also I trying to check myself by deploying the same war to jboss 8 as.
Inside Jboss it works as expected.   

Servlet code:
@WebServlet(name="multipart-servlet-test", urlPatterns={"/upload"})
@MultipartConfig
public class MultipartServletTest extends HttpServlet {
        private static final long serialVersionUID = 1L;
       
        protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
                final Part filePart = request.getPart("exampleFile");
                response.getWriter().write("Part of file: " + filePart);
        }
}




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032144.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Reply via email to