views:

24

answers:

0

Hi, I am having problems reading a zip file that I have uploaded to the server (GAE). I am uploading a zip file with a csv file that I need to read in order to write to the database. However, GAE does not allow direct writing of the file on server. How do I open an inputstream to read the file? I am using struts framework.

Part of my upload form:

--form action="upload" method="post" name="uploadForm" enctype="multipart/form-data" --

Servlet to read uploaded file:

I try using the below 2 lines to parse the request into a inputstream.There are no errors but the database has nothing inserted.

InputStream is = request.getInputStream(); ZipInputStream zis = new ZipInputStream(is);

Is this the correct way to read a zip file in GAE?