• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

streaming images from custom tags

 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

Is it possible to stream an image from a custom tag to the browser? If so, how is this done?

Thanks
eric
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's possible, it probably wouldn't make much sense to do so.

Tags are meant to be embedded into HTML.
If your response is returning text (HTML) then you can't also mix binary data (images) with it.

Maybe if you explain what you're trying to accomplish, someone can offer a better alternative.
 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I currently have a custom tag which writes an img tag to the browser, The img tag calls a servlet and passes a very long parameter, more than the 2000 or so characters allowed by IE. So to avoid the long parameter (which describes chart data) I want the tag itself to produce the image and stream it.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The img tag calls a servlet and passes a very long parameter, more than the 2000 or so characters allowed by IE. So to avoid the long parameter (which describes chart data) I want the tag itself to produce the image and stream it.


1. img tags can only address a resource with a URL, browsers make a separate request based on this URL so there is no way the tag can produce anything.
2. why dont you make use of automatic session mechanism and put the 2000 or so characters into the user session, then have the image creating servlet access the session?
[ May 21, 2008: Message edited by: William Brogden ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic