// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
try{
HashMap<String, String> propMap = readIniFile("search.ini");
// Parse the request to get file items.
List fileItems = upload.parseRequest(request);
// Process the uploaded file items
Iterator iterator = fileItems.iterator();
HashMap<String,String> fieldMap = null;
fieldMap = new HashMap<String, String>();
In the above code, exception is caught at line List fileItems = upload.parseRequest(request);. Here ServletFileUpload is used as a file handler and we usecommons-fileupload-1.4.jar for it.
We were trying to upload file using this program, but we are getting IllegalStateException : getInputStream() called after getReader() called at 2nd line inside the try block itself. And also we are not getting the details were the exception is occurred. I want the reason for this exception and how it can be solved