tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Lauri" <pe...@lauri.se>
Subject Servletexception from nowhere :/
Date Thu, 30 Dec 2004 05:20:30 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message