aspose file tools*
The moose likes Servlets and the fly likes Problem Using MultipartRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem Using MultipartRequest " Watch "Problem Using MultipartRequest " New topic
Author

Problem Using MultipartRequest

Carlos Matus
Greenhorn

Joined: Aug 22, 2001
Posts: 2
I'm using the multipart request classes from O'Reilly in my application, that class works fine in my windows NT workstation under TomCat.
However now my applications is moved to a Sun solaris server, when I try to upload a file, class seams to work fine because not error is showed, but the file is not saved in the file system. I don't know why this strange behavior. I think it's necesary to flush or close something, but I'm not sure what.
My app makes sure that a directory exist and it has permission to write, actually it creates the directory before download file and it works ok.
Does any body knows how to correct that behavior ?
Vishnu Mohan
Greenhorn

Joined: Aug 24, 2001
Posts: 2
Hi,
We also used the MultipartRequest .
We created a Directory PrintUpload Under Sun Solaris and gave read and write permission to it.
We upload the files to this directory.
Before Uploading I set the encoding(In a Servlet) as shown in the below Java Script embedded in JavaCode.
out.println(" document.frm.encoding="+"\"multipart/form-data\";");
out.println(" document.frm.method='POST'");
out.println(" document.frm.action="+"\"/jservlets/PrintAdmin"+"\";");
out.println(" document.frm.submit();");
--- Here 'out' is object of PrintWriter .
If u have also done this there is something else i'am missing
Hope it help's
arvind
Greenhorn

Joined: Aug 27, 2001
Posts: 11
i am not able to upload files on my server(apache &jserv).I get the following error namely:
java.lang.IllegalArgumentException: Not a directory: ../yogesh
at com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:109)
at test.doPost(test.java:11)
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:317)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java)
i used the following multipartrequest:
MultipartRequest multi = new MultipartRequest
(req,"../yogesh",5*1024*1024);
kindly suggest a solution(changes to be made) so that the files get uploaded in the folder yogesh.
Bhuvana Bala
Greenhorn

Joined: Jul 19, 2001
Posts: 10
hi can u tell me the procedure ad the code to uplaod in Jsp.More Over I should upload only the pdf files. pl. help.I am stuck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem Using MultipartRequest