File download dialog box is coming while opening the document using Servlet

Discussion in 'Software' started by aarthi, Apr 24, 2007.

  1. aarthi


    Apr 24, 2007
    Likes Received:
    The user screen I've view link, if I click this link it will go to servlet and open one word document. It is opening properly, but while opening the document it generate one dialog box like file Open, Save or Cancel button(file download), if I click open after that it is opening the document. But my query is it should not display this file download dialog box, once I click the link it should open the document automatically. Can any one help me to avoid the pop up window?

    Sample Code


    response.setHeader("Content-disposition","attachment; filename=testing.doc");


    Please help me.

    aarthi, Apr 24, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.