Take the 2-minute tour ×

I have text files stored in GAE Blobstore. Now I want to read the contents of the file and view them in my browser, without actually downloading the file.

I am accessing the servlet by clicking on link on my HTML page which access the servlet.

I am serving the file with blobKey

    String blobKey = req.getParameter("blobKey");
    BlobKey blobKey = new BlobKey(blobKey);
    blobstoreService.serve(blobKey, resp);

But the above code is downloading the file instead by displaying it in a browser. Can anyone help me please.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Remove the line setting the Content-Disposition in the header, that should do the trick.

share|improve this answer
Thank You Sir...!!! –  Ankur Jain Oct 8 '12 at 8:41

Your Answer


