• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Problem Using MultipartRequest

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic