aspose file tools*
The moose likes Servlets and the fly likes **** com.oreilly.servlet.MultipartRequest Error *** Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "**** com.oreilly.servlet.MultipartRequest Error ***" Watch "**** com.oreilly.servlet.MultipartRequest Error ***" New topic
Author

**** com.oreilly.servlet.MultipartRequest Error ***

Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
hi all
i keep getting this errors:
java.lang.IllegalArgumentException: Not a directory: malhar
at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:109)
at Upload_Test.doPost(Upload_Test.java:27)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:521)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:335)
at org.apache.jserv.JServConnection.run(JServConnection.java:197)
at java.lang.Thread.run(Thread.java)
when i give :
MultipartRequest multi=new MultipartRequest(req,"malhar",5* 1024 * 1024);
even after creating directories name "malhar" on the server.
pls need yr help urgently
thnx
malhar

Malhar Barai
SOA & Java Book
Dmitriy Pavlyuk
Ranch Hand

Joined: Mar 25, 2001
Posts: 33
Try to set absolute path to this directory or valid the relative path.
Dmitriy.
arvind
Greenhorn

Joined: Aug 27, 2001
Posts: 11
hi! malhar,
give the real path by using the foll. servlet:i.e(req,www/htdocs/server-name/malhar,1024*1024)
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class test2 extends HttpServlet
{

public void doGet(
HttpServletRequestrequest,
HttpServletResponseresponse
) throws ServletException, IOException
{
PrintWriterout;
Stringtitle = "Output";
// set content type and other response header fields first
response.setContentType("text/html");
// then write the data of the response
out = response.getWriter();

out.println("checking for include files");
out.println("<HTML><HEAD><TITLE>");
out.println(title);
out.println("</TITLE></HEAD><BODY>");
out.println("<H1>" + title + "</H1>");
out.println("path information "+ request.getPathInfo());
out.println("<br>");
out.println("servlet information "+ request.getServletPath());
out.println("<br>");
out.println("realpath information "+ request.getRealPath("/"));
out.println("<br>");
out.println("protocol information "+ request.getProtocol());
out.println("</BODY></HTML>");
out.close();
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: **** com.oreilly.servlet.MultipartRequest Error ***