Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mixing content

 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I mix content using servlet, i.e. I wan to generate a page containing ordinary HTML tags as well as dinamicly created JPG image. I don't want to store image on server's file system. It must be sent on the fly with HTML code.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way of achiving this is to provide a servlet which generates the binary stream for an image. Then your jsp would just call the servlet in its image tag
e.g.
<img src="http://myhost.com/myapp/imgservlet"/>
You cannot mix a normal HTML page (and nothing else is the result of a JSP) with some binary content.
 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!