tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Miehs <and...@2sheds.de>
Subject Re: Simple question, but can't figure out answer
Date Tue, 11 Jul 2006 21:26:45 GMT
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message