I am trying to upload an image on server using JSP. I want to upload the file using only JSP without Servlet. Suggest me the simplest code with jar files needed I am using the following code but its not working.
<html>
<head>
<title>File Uploading Form</title>
</head>
<body>
<h3>File Upload:</h3>
Select a file to upload: <br />
<form action = "UploadServlet" method = "post"
enctype = "multipart/form-data">
<input type = "file" name = "file" size = "50" />
<br />
<input type = "submit" value = "Upload File" />
</form>
<%@ page import="com.oreilly.servlet.MultipartRequest" %>
<%
MultipartRequest m = new MultipartRequest(request, "d:/new");
out.print("successfully uploaded");
%>
</body>
</html>