views:

277

answers:

0

I moved to new server and changed apache-tomcat connector from mod-jk2 to proxy-ajp. Since I have this problem with file(xls file to be precise) uploading. If I try file uploading through http://my.project.net**:8080**/fileupload.jsp it works just fine, but I want it to be secure and there is the problem, if I use https://my.project.net/fileupload.jsp it throws an exception :

"Processing of multipart/form-data request failed. Stream ended unexpectedly org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384) org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717l) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) java.lang.Thread.run(Thread.java:619)"

For file uploading I use apache commons file upload (http://commons.apache.org/fileupload/) this is the code: " FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); List items = upload.parseRequest(request);//this is the point when exception is thrown Iterator iter = items.iterator(); "

I think the problem is proxy but I don't have the solution. Any help is appreciated. Thanks Milos