Hi Jennifer,

Very strange! Tomcat and perl cgi! cool - didn't know it worked...

Are you sure you are not using Apache with mod_jk, or mod_proxy?

As for the perl..... Where is the page that prints the HTML?

why don't you just add

        print '<img src="'.$IMAGE_DIRECTORY.$image.'">';

Very confused....

Or could it be that you are using the wrong document root?

does http://myservername/images/icc-logo.gif deliver the correct image?

Andrew.


#!/usr/local/bin/perl -w

#
#

use warnings;
use CGI qw/:standard/;
use CGI::Carp qw( fatalsToBrowser );

use constant BUFFER_SIZE => 4_096;
use constant IMAGE_DIRECTORY => "/images";

$|=1 ;

$q = new CGI;
print $q->header( -type => "image/gif" ); binmode STDOUT; my $buff =
""; my $image = "icc-logo.gif";

local *IMAGE;
open IMAGE, IMAGE_DIRECTORY . "/$image" or die "cannot open file
$image:
$!";
while ( read( IMAGE, $buff, BUFFER_SIZE ) ) {
   print $buff;
} close IMAGE;



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to