Fabien Jaulmes wrote:
>
> Hello,
>
> I have to include a GIF image in my servlet generated Webpage.
> I created a servlet like class GetImage with the following in the doGet
> method :
> {
>     res.setContentType("image/gif");
>     res.setHeader("pragma", "no-cache");
>     ServletOutputStream out = res.getOutputStream();
>
>         //... reading necessary input data to generate the GIF
>
>     GraphGenerator graphique = new GraphGenerator(data);
>
>     graphique.createGraph(out);
>
>     out.close();
> }
>
> Then in my main servlet I have a doPost method including :
>
>     out.println("<img src=\"GetImage\">");
>
> Still this si not working...
>
> Why ?

Because the url you are using for the image source is incorrect. You need to use
a url that tells the web server to pass the request to the GetImage servlet.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to