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
So, what I did is to use the instance of fileItem as in:
Hashtable incoming = new Hashtable();
fileName = sfu.parseRequest(request);
//iterating over each uploaded file and storing the values of different parameters in the HashTable (incoming)
for(FileItem f:fileName)
{
incoming.put(f.getFieldName(), f.getString());
}
//utilizing that HashTable and getting the value of desired field in the below manner, as in my case i required the value of "permissions" from the jsp page
for(FileItem f:fileName)
{
String role= (String)incoming.get("permission"); //as it is a multipart form request, so need to get using this
}
Thanks