Servlets should be stateless, so if you upload a file through a servlet
you should not expect the servlet to know about this when it processes the next request.
You have two options, upload the file and other parameters together in one request as shown in the tutorial here:http://docs.oracle.com/javaee/6/tutorial/doc/glraq.html
or
Upload the file and save it somewhere where the servlet will be able to query later, e.g database.