Its ur responsibilty to use the fileinput and fileoutput streams to read
actual data and store it in ur database. U can access the file name as :
   <html>
<body>
  <form name=form1 method=get
action="http://localhost:8080/servlet/tryAttach">
    <input type=file name=fname>
    <input type=submit name=sub value=submit>
  </form>
</body>
</html>

public void doGet(HttpServletRequest req,HttpServletResponse res) throws
         IOException, ServletException {
                String file = req.getParameter("fname");
                System.out.println("Selected file : " + file);
        }

bye,


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Larry Liu
Sent: Thursday, May 11, 2000 9:26 AM
To: [EMAIL PROTECTED]
Subject: File Select and JSP


Hi:

I want to have an efficient solution to handle file select with JSP

applying HTML4.0 spec: we implemented the file select function below
        <input type=file id=file name=file>
How can I get the selected file name? from which param?


Thanks

Larry

===========================================================================
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

Reply via email to