You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Pons, Patrick" <pa...@eds.com> on 2003/03/26 17:38:54 UTC

Help: CGI from apache to tomcat using GD::Graph

> Hi,
> 
> I'm experiencing the following problem:
>   - On the same server, I've installed apache and tomcat 4.1.18.
>   - I've copied my already working cgi programs (written using perl with
> CGI, GDGraph, ...). Everything is OK except... with graphics.
>   - Whilst this program output is correct with Apache, nothing is returned
> with Tomcat.
> 
> If someone could help me... I'm running out of idea.
> 
> Rgds,
> 	Patrick
> 
> P.S.: Here is a small program working under apache but not Tomcat:
> 
> #!/usr/bin/perl -wT
>  use strict;
>  use CGI;
>  use GD::Graph::mixed;
> 
>  use constant TITRE => "Avg time";
> 
>  my $req     = new CGI;
> 
>  my $graph = new GD::Graph::mixed( 400, 300 );
>  my @myData  = (
>      [ qw( Lun  Mar  Mer  Jeu  Ven ) ],
>      [      33,  24,  23,  19,  21   ],
>      [      17,  15,  19,  15,  24   ],
>  );
> 
> 
>  $graph->set(
>      title           => TITRE,
>      x_label         => "Days",
>      y_label         => "Min",
>      long_ticks      => 1,
>      y_max_value     => 40,
>      y_min_value     => 0,
>      y_tick_number   => 8,
>      y_label_skip    => 2,
>      bar_spacing     => 4,
>      types           => [ "bars", "linespoints" ],
>  );
> 
>  $graph->set_legend( "AM", "PM" );
>  my $image_gd = $graph->plot( \@myData );
> 
>  print $req->header( -type => "image/png", -expires => "now" );
> 
>  binmode STDOUT;
>  print $image_gd->png;
> 
> ###=======================================================================
> ========================
> 
> 
> Patrick PONS
> EDS SAS
> 125, rue de Sausurre
> 75017 PARIS
> France
> 
> Business: +33 (0) 1 56 79 62 30
> Fax:      +33 (0) 1 40 53 04 91
> <ma...@eds.com>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org