Is
enctype="multipart/form-data"
option of form doesn't allow other form data to be submited? if it doesn't allow it then what are the other options I have to send this additional textfield to the server.
No there is no issue with using enctype="multipart/form-data"
. You can get other fields then file in such form.
Or is there any other problem in my code?
Yes, as for now. While using enctype="multipart/form-data"
you can not directly get parameters by using request.getParameter(name);
. While using it, form fields aren't available as parameter of the request, they are included in the stream, so you can not get it the normal way. You can find a way to do this in the docs of using commons-fileupload#Processing the uploaded items.