We would like to show the PDF document in an HTML page after retrieving it from the database via a servlet's doGet
method.
Can anyone share some snippets on how to achieve this?
Non-html content apart from images needs to be retrieved using an object, embed or iframe tag
<iframe src="somepage.pdf"></iframe>
<object src="somepage.pdf"><embed src="somepage.pdf"></embed></object>
somepage.pdf could be somepage.jsp?filename=somepage&mimetype=application/pdf
Here is an interesting link How to Embed Microsoft Office or PDF Documents in Web Pages
and here is a stackoverflow search