Header Ads

  • Breaking Now

    How can I show various kind of documents to a web client from JSP's and/or servlets?

    You can show MS Word, Excel or PDF or any other type of document through your JSP or servlet by using :

    response.setContentType("mime/type");   and

    in jsp directive 

    <%@ page contentType="mime/type" %>.


    In case of MS Word documents contentType is "application/msword"
    In case of Excel it is "application/vnd.ms-excel"
    In case of PDF it is "application/pdf"

    No comments

    Post Top Ad

    Post Bottom Ad