Unable to read form field in servlet [duplicate]
This question already has an answer here: How to upload files to server using JSP/Servlet? 12 answers Hey I am quite new to servlet environment. Here I am trying to post a form to my servlet with something like this: <form action="OnlineExam?q=saveQuestion" method="post" enctype="multipart/form-data"> <fieldset> <legend>Question</legend> <textarea class="questionArea" id="question" name="question">Enter Question.</textarea> <br class="clearFormatting"/> Attach File<input type="file" name="file" /> <input class="optionsInput" value="Option A" name="A" onfocus = "clearValues('A')" onblur =