This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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 ?
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
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.