Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Showing .tif images on browser

 
asheesh talwar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Currently I am doing one module where in I have to show the tif images (.tif extension) on the browser through servlet. I was wondering if there are any Java API's which I can use to show them. I am using JSP on the front end.
Thanx very much!
-Asheesh
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need a special API to send binary data to the browser from a servlet (not a JSP). Just make sure you set the content type and content length in the response.
Bill
 
Omar IRAQI
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
You can also embed the URL of the tif image as a static link within the JSP page.
This way, when the browser downloads the JSP page content, it would find the tif URL, and would request it from the web server. All you need is to put the tif image in the web server at the correct location relativly to the web server document root (not the web container document root).
Regards
 
asheesh talwar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill / Omar
The tif image needs to be converted before we can show them on the browser. I have tried that before putting the query. If you want I can send U the image. Thanx for the reply.
-Asheesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic