I am using Jakarta Commons for uplaoding file. the files are uploaded correctly, the problem is if i have in tha same form for uploading a file other form elemenrs like a text field, whenever i use the requesti.getParameter() it returns null althoug this text field is inside hte same form as the file input?? so how to include other inpt fields with the file??
If you are using apache commons, the parseRequest(..) method gives you the list of FileItem's, the form fields will be part of that list.
You can use isFormField() method on the FileItem (while enumerating the list) to verify if its a form field, and you can get the value of the form field using getString() and name of the field using getFieldName() methods on FileItem.
I was wondering if I want the content of the file as byte[] what shall I do, I know I will use the fileItem.getInputStream() but I do not know how to use it any help!!