Bookmark Topic Watch Topic
  • New Topic

showing file on browser

 
Subha Rangu
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
I need a suggestion here.
In a JSP page, I call a method of a Javaclass and get a file dynamically. That file could be any format like, pdf,tif,afp,gif,jpeg etc. I need to show that on the browser.

I tried using <IMG> tag and <EMBED> tag but both of them don't support all the file types.

I was told by someone that I can use JavaScript window.open(file). But I have never done Javascripting so not sure if that could be achieved for dynamic programming.

I have file name as a string.

Please suggest me the best way to show it on the browser and also, that should be having a form which contains a close button as well.

Thanks in advance,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Bubly, please do not post the same question multiple times.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!