Step 1: move all of the Java code out of the JSP and into a Servlet where it belongs. This is a gross misuse of technology. JSPs are for creating text views like HTML, not processing files.
I see that you are using some external package- com.oreilly.servlet.* - Do you have this jar in your classpath? And MultipartRequest is mostly from that package.
Shounak Kundu wrote:Hi, I am trying to upload an image to database. Prior to that , I am just making the temporary file from where it will be stored in the table.
But I am getting this error.
MultipartRequest cannot be resolved to a type
I to had the same problem . The problem is jar file. Download from official site http://www.servlets.com/cos/ , hope resolves