Uploading Files Using MultipartRequest while Parsing Other Params

Discussion in 'Java' started by Ones Self, Dec 25, 2004.

  1. Ones Self

    Ones Self Guest

    Hi,

    I'm using Tomcat 4.1.31 with Velocity 1.4, and I'm trying to upload a
    file to my servlet using O'Rielly's MultipartRequest class
    (http://www.servlets.com/cos/). The problem is that I'm submitting a
    page which contains other input fields (other then the file path), and
    I need to process those in addition to saving the file to disk.
    However, when I try to submit the form I don't get the other input
    fields. For example:

    <form name="uploadForm1" action="SaveForm" method="POST"
    ENCTYPE="multipart/form-data">
    Text: <input type='text' name='text1'><br>
    File: <input type='file' name='pic1'><br>
    <input type='submit' name='upload' value='Upload'>
    </form>


    In this case I will not get the "text1" input field in the
    HttpServletRequest object. Are these values available anywhere in the
    request other then the "getParameter" method?

    Thanks
     
    Ones Self, Dec 25, 2004
    #1
    1. Advertising

  2. Ones Self

    Ryan Stewart Guest

    Ones Self wrote:
    > Hi,
    >
    > I'm using Tomcat 4.1.31 with Velocity 1.4, and I'm trying to upload a

    [...]

    See answer in comp.lang.java.help. Please do not multipost.
     
    Ryan Stewart, Dec 26, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul  Smith
    Replies:
    1
    Views:
    3,167
    Paul Smith
    Nov 17, 2003
  2. Replies:
    0
    Views:
    452
  3. John C. Wallace

    C++ MultipartRequest

    John C. Wallace, Sep 29, 2003, in forum: C++
    Replies:
    1
    Views:
    442
    Jonathan Mcdougall
    Sep 29, 2003
  4. ragz_82
    Replies:
    0
    Views:
    477
    ragz_82
    Feb 4, 2011
  5. Barry
    Replies:
    9
    Views:
    454
    Ara.T.Howard
    Sep 15, 2005
Loading...

Share This Page