If you mean that I have servlet-api.jar inte WEB-INF/lib I do not. I had it in the CLASSPATH system variable (as guided in the setup of Tomcat). The only thing I have in WEB-INF/lib is mysql_connector.jar and commons-fileuplad-1.0.jar.
There seems not to be any solution to this problem :( Am I stupid or what is it? Regards, Peter Lauri -----Ursprungligt meddelande----- Från: Tim Funk [mailto:[EMAIL PROTECTED] Skickat: den 30 december 2004 18:30 Till: Tomcat Users List Ämne: Re: Servletexception from nowhere :/ You have put the servlet spec jar file into your webapp classloader. Get rid of it since servlet.jar is already available via the common classloader. http://jakarta.apache.org/tomcat/faq/classnotfound.html -Tim Peter Lauri wrote: > Best groupmember, > > I use the CommonFileUpload package to handle file uploads. I am trying to > get it to work by using the first basic method (from a user-tutorial). The > servlets compiles correctly in Eclipse, and I have all the libs at the > correct places. Servlet-api.jar and jsp-api.jar is in the classpath. > Common-fileupload.jar is in the WEB-INF/lib folder. This snippet throws an > ServletExeption: > > public void doPost (HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > PrintWriter out = response.getWriter(); > if(FileUpload.isMultipartContent(request)) { > out.println("Ok, there is a multipart content..."); > } else { > out.println("No multipart content..."); > } > } > > In the Commons mailinglist they said that it is not a problem with > Commonfileupload, but all other Servlets I have created works just fine. > > The full message is: > > javax.servlet.ServletException: Invoker service() exception > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java > :477) > org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169) > javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > root cause > > java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream > ImageUpload.doPost(ImageUpload.java:56) > javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java > :419) > org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169) > javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > Suggestions where to start to dig (I have already been digging for a week > :))? > > -- Best of Times > Peter Lauri > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]