hi, you need to change the content type to "multipart/form-data" b.l
On Fri, Feb 4, 2011 at 6:45 PM, vinay basavanal <vins1...@gmail.com> wrote: > HI all, > > I am trying to upload an excel sheet and read it.I am using apache commons > file upload and apache poi to read excel. > > This is my jsp > > <%@ page language="java" contentType="text/html; charset=ISO-8859-1" > pageEncoding="ISO-8859-1"%> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " > http://www.w3.org/TR/html4/loose.dtd"> > <html> > <head> > <meta http-equiv="Content-Type" content="text/html" > > <title>Insert title here</title> > </head> > <body> > <form name="read" action="./read" method="get" > > <input type="file" name="upfile" id="upfile" onchange="file();" > > <input type="submit"> > </form> > </body> > </html> > > > > and in sevlet > > > ServletFileUpload servletFileUpload = new ServletFileUpload( > new DiskFileItemFactory()); > if (ServletFileUpload.isMultipartContent(request)) { > System.out.println(" right ......."); > } > > its failing at ServletFileUpload.isMultipartContent(request) > > > > i get following exceptio > > he request doesn't contain a multipart/form-data or multipart/mixed stream, > content type header is nul > > -- > You received this message because you are subscribed to the Google > Groups "Java EE (J2EE) Programming with Passion!" group. > To post to this group, send email to > java-ee-j2ee-programming-with-passion@googlegroups.com > To unsubscribe from this group, send email to > java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com > For more options, visit this group at > > http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en