in the call to MultipartRequest, all you need to do is replace the "."
parameter with the path to the desired directory. i.e. MultipartRequest
multi = new MultipartRequest(request, "C:\tomcat\webapps\myapp\images"); .
-----Original Message-----
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 9:13 AM
To: [EMAIL PROTECTED]
Subject: MultipartRequest (saveDirectory) ??
Hi, I am using the class MultipartRequest for uploading files under tomcat,
it works fine, but the files go to :
C:\tomcat\bin
I am looking to put them in
C:\tomcat\webapps\myapp\images
The servlet that UploadTest that use the class MultipartRequest is like this
:
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.oreilly.servlet.MultipartRequest;
public class UploadTest extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
try {
MultipartRequest multi =
new MultipartRequest(req, ".", 5 * 1024 * 1024);
..........
}
I need to change "." from the constructor so that my uploaded files go to
C:\tomcat\webapps\myapp\images
Please help.
Thanks
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets