title: Multipart/form - Create a string from checkboxes and send to db
body: <p>I have a multipart/form-data form that contains a file upload section and other fields such as checkboxes. I would like to create a string based on the information from checkboxes, delimitered with ";" in order to send it to the database.</p>
  
  <p>My UploadServlet looks like this:</p>
  
  <pre><code>try {
          // parses the request's content to extract file data
          List formItems = upload.parseRequest(request);
          Iterator iter = formItems.iterator();
  
          // iterates over form's fields
          while (iter.hasNext()) {
  
              FileItem item = (FileItem) iter.next();
              // processes only fields that are not form fields
              if (!item.isFormField()) {
  
                                      //doSomething 
  
                  String fileName = new File(item.getName()).getName();
                  String filePath = uploadPath + File.separator + fileName;
                  File storeFile = new File(filePath);    
  
                  // saves the file on disk
                  item.write(storeFile);
  
  
              }
              else
              {
  
              // Process regular form field (input type="text|radio|checkbox|etc", select, etc).
                  String fieldname = item.getFieldName();
                  String fieldvalue = item.getString();
                  // Do anotherThing
  
  
                 // Can I create a string from the checkbox inputs here?
  
              }
  </code></pre>
  
  <p>Thanks!</p>