I am trying to compile UploadServlet servlet via apache tomcat 8.0.14.
my web.xml is fine andUploadServlet.java has compiled properly but yet when
You need to put commons-fileupload.jar and commons-io.jar to your WEB-INF/lib forlder. Classpath is used during build, but they must be available during runtime also.
Actually, if you had used IDE for Java EE development (like Eclipse) putting these Jars to WEB-INF/lib would be enough, as they would be automatically visible in the claspath for build.
as @Gas , I forgot to add .jar file in WEB-INF/lib folder. and then the issue resolved.