I use Apache Commons FileUpload in a java server-side app that has a html form with fields :
a destination fied that will be filled with email address of t
I am guessing you are using a FileItemIterator to iterate the items in the request. The iterators next() method returns a FileItemStream (not a FileItem). Open the stream on that object and turn it into a string like this:
import org.apache.commons.fileupload.util.Streams;
...
FileItemStream item = iterator.next();
InputStream stream = item.openStream();
String name = item.getFieldName();
String value = Streams.asString(stream);
The getString method suggested by other answers is a method on the FileItem interface.