MultipartRequest is a class written by Jason Hunter, and is available at www.servelets.com >From: Joe Hanink <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: MultipartRequest >Date: Wed, 16 Aug 2000 12:34:20 -0700 > >I am unable to find MultipartRequest in the SDK1.3 nor in J2EE. is this in >an extension? > >can someone point this out for me. >thx > >-----Original Message----- >From: A mailing list about Java Server Pages specification and reference >[mailto:[EMAIL PROTECTED]]On Behalf Of Sundeep Goswami >Sent: Wednesday, August 16, 2000 10:06 AM >To: [EMAIL PROTECTED] >Subject: Getting form parameters > > >Hello!, >I have a form with the enctype=multipart/form-data >I need to upload a file but before i do that i need to get the paramters >from the text fields and validate the values if successful i need to call >the MultipartRequest class to do the actual upload. >The problem i am facing is that in the Upload.java servlet, doPost method i >am unable to get the values from the request object. >I have provided the code snippet > >Upload.java > >public class Upload extends HttpServlet { > > public void doPost(HttpServletRequest req, HttpServletResponse res) > throws ServletException, IOException { > res.setContentType("text/html"); > PrintWriter out = res.getWriter(); > > -- this returns a null > System.out.println ("The name is " + req.getParameter ("Name")); > > MultipartRequest multi = new MultipartRequest(req); > > -- now this gives a valid value > System.out.println ("the name is " + multi.getParameter("Name")); > } >} > >The getParameter method is provided in the MultipartRequest class. >The problem is due to the "multipart/form-data" attribute. Can someone help >me out with this and tell me how i can get the information from the request >object before i call the multipartrequest class. > >Thanks. >________________________________________________________________________ >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > >=========================================================================== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >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". >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 ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". 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
