Results 1 to 2 of 2
  1. #1
    sudipanand is offline Member
    Join Date
    Nov 2008
    Rep Power

    Default Problem in reading HTML input field while uploading file

    When i use multipart/form-data as my form enctype, then i have problem in reading html input field value.
    i.e. Assume that i have following HTML Form

    <form name="frmFileUpload" enctype="multipart/form-data" method="post">
    <input type="text" name="txtName">
    <input type="file" name="uploadFile">
    <input type="submit" name="butSubmit" value ="Upload">

    And, here i am tring to read txtName input field value using follwoing code fragment in my ApplicationController


    this gives me null value.

    Let me know, how do i read the input field value when Form's enctype type is multipart/form-data

    nt anand
    Last edited by sudipanand; 11-26-2008 at 08:24 AM.

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    getParameter is documented to work on either post data or get data, code above looks correct to me.

    Where is this running?
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Similar Threads

  1. uploading a file
    By itssiva in forum Java Servlet
    Replies: 4
    Last Post: 01-16-2009, 11:41 AM
  2. Reading input file into an array
    By littlefire in forum New To Java
    Replies: 6
    Last Post: 10-18-2008, 11:51 PM
  3. File Uploading
    By aaliadhurue in forum Advanced Java
    Replies: 4
    Last Post: 01-16-2008, 07:56 PM
  4. Reading a Field in a Binary File
    By janakiram.attuluri in forum Advanced Java
    Replies: 2
    Last Post: 01-09-2008, 11:47 AM
  5. Problem reading an xml file with AJAX
    By Fiona80 in forum XML
    Replies: 0
    Last Post: 12-17-2007, 09:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts