open pdf file from a JSP page

Discussions

Web tier: servlets, JSP, Web frameworks: open pdf file from a JSP page

  1. open pdf file from a JSP page (2 messages)

    How can I open a pdf, doc, xls, etc, files from a JSP page.
  2. You can use response.setContentType(MIME type) if you are going to open the PDF file and stream the contents out as the response.

    Or you can have a link to the desired file in the jsp so that the user can click on the link to download the file.
  3. To open execl document in JSP[ Go to top ]

    Hi,

      Set response.setContentType().... for example to open micorsoft excel, response.setContentType("application/vnd.ms-excel");

    --Suresh