dcsimg
Display HTML-Tags and Images in one Servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Johanna_Klingmann
Posted On:   Thursday, October 14, 2004 01:04 AM

I have a problem concerning jpeg-images and html: I'm trying to display a chart (*.jpeg) in a html-page. The problem is: you can't use response.setContentType("text/html") and response.setContentType("image/jpeg") together. How would I get the image into the page? I thought of something like creating one servlet with content type "image" and one servlet with content type "text" which calls the chart-servlet. Would this work? And what would the html-tag to call the image be ? Thanks in advance, Johanna    More>>

I have a problem concerning jpeg-images and html:





I'm trying to display a chart (*.jpeg) in a html-page.

The problem is: you can't use response.setContentType("text/html") and response.setContentType("image/jpeg") together.

How would I get the image into the page?





I thought of something like creating one servlet with content type "image"

and one servlet with content type "text" which calls the chart-servlet.

Would this work? And what would the html-tag to call the image be ?



Thanks in advance, Johanna

   <<Less

Re: Display HTML-Tags and Images in one Servlet

Posted By:   Anonymous  
Posted On:   Thursday, October 14, 2004 10:49 AM

The idea of having two servlets is probably a good idea. You could then reference the image servlet via a img tag where the source is the servlet handling the jpeg.
About | Sitemap | Contact