Meaningless Drivel is fun!
The moose likes JSP and the fly likes PDF file and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "PDF file and JSP" Watch "PDF file and JSP" New topic

PDF file and JSP

Mike Yu
Ranch Hand

Joined: Nov 17, 2001
Posts: 175
When we click a link (in a JSP or HTML page) that links to a PDF file, Adobe Acrobat is open and the PDF file is displayed in a browser. What I have seen is that the only content in the browser is this PDF document. Is it possible to make a page that contains both the PDF document and other HTML or JSP stuff?

Thanks,<br />Mike
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

Probably not directly, but you could embed the PDF in an iframe if that suits your purpose.

[Asking smart questions] [About Bear] [Books by Bear]
Sandep Chaturvedi
Ranch Hand

Joined: Aug 20, 2002
Posts: 49
You can definitely not mix html and pdf. They are two different documents. This is ensured by the content type of the response (application/pdf for pdf and text/html for html). They can be viewed together using frame.
Mike Yu
Ranch Hand

Joined: Nov 17, 2001
Posts: 175
Hi Bear and Sandep,
Thank you for your info. It is very helpful.
I agree. Here's the link:
subject: PDF file and JSP
It's not a secret anymore!