Я должен загрузить файл, пока я пытаюсь запустить, показывая сообщение
org.apache.jasper.JasperException: Exception in JSP: /RootSipResource.jsp:33
30: out.println("Cookies" + request.getCookies());
31:
32: DiskFileUpload upload=new DiskFileUpload();
33: List items=upload.parseRequest(request);
34: Iterator it=items.iterator();
35: while(it.hasNext())
36: {
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
javax.servlet.ServletException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.RootSipResource_jsp._jspService(RootSipResource_jsp.java:577)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:768)
org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:323)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:341)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302)
org.apache.jsp.RootSipResource_jsp._jspService(RootSipResource_jsp.java:91)
На странице jsp поле формы устанавливается как
<form name="frm" id="frmLoad" method="post" enctype="multipart/form-data">
isMultipart печатается как true (boolean isMultipart = FileUpload.isMultipartContent(request);)
`out.println("Content Type ="+request.getContentType());` is printed as null