I want to have both text and an png image in my JSP file. I build the image on the server side and use an encoder to get a png image. I try to put this image in the outputstream but it seems I cannot have different content types in a jsp file. How can I manage to have several types of content in a same JSP ?

Igor Royzis

This is what I've done:

...some JSP code
<img src="/YourServlet?param=value">
...more JSP code

Above example shows how to get Image from a servlet which generates it. Inside your servlet set the output type to image/png.