Forums Register Login

Mixing content

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Thank you!
Paper beats rock. Scissors beats tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 675 times.
Similar Threads
Fetching an image from the specified URL and resizing it.
how to find the size of web page
urgent - display Image (binary) + html in single page
Showing image from servlet
Problem running Servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:15:08.