how to know how many object type="file" there are in a jsp <p>i'm created a form to upload images into a blob field of a mysql database.</p> <p>In a servlet i get the imagine inside a type="file" field in a jsp page.</p> <pre><code> Part filePart = request.getPart("Name_of_the_FILE_fields"); </code></pre> <p>Now i want to allow user to upload more images at the same time, so i put in my jsp page a lot of type="file" field.</p> <p>I thought that i could do something like this </p> <pre><code> Part filePart[] =request.getParameterValues("Name_of_the_FILE_fields"); </code></pre> <p>but of course this is not the right way to do it.</p>