RE: Simple question, but can't figure out answer

2006-07-12 Thread Mead, Jennifer L - VSCM
YES!  It now works, and it was idiocy on my part.  I had so many
different images directories it was insane BUT NOT
/usr/local/tomcat/webapps/ROOT/images/.  I thought it had to be under
the WEB-INF directory.  Ahhh, sigh of relief.  Thanks so much.  I am
staying on this list because it is a great bunch of users.  Besides I
can contribute here and there.  Great response and I really appreciate
it.

Jennifer


-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 7:19 AM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

No I am really confused

Your server name is  ...

and looking at your perl code, you were trying to get to an image called
icc-logo.gif
  http:///images/icc-logo.gif
replace  with the name of your server

This SHOULD display the gif...

if your tomcat is installed in /usr/local
then I would expect at least the following files to exist

/usr/local/tomcat/
/usr/local/tomcat/webapps/
/usr/local/tomcat/webapps/ROOT/
/usr/local/tomcat/webapps/ROOT/images/
/usr/local/tomcat/webapps/ROOT/images/icc-logo.gif
/usr/local/tomcat/webapps/ROOT/WEB-INF/

IF not - then we need to describe exactly what you have

Are you sure you are only running Tomcat on this box?

what does "ps auxw" say?

Andrew



On 12/07/2006, at 4:10 PM, Mead, Jennifer L - VSCM wrote:

> Nope, where and what is it trying to display?
>
> -Original Message-
> From: Andrew Miehs [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 12, 2006 7:08 AM
> To: Tomcat Users List
> Subject: Re: Simple question, but can't figure out answer
>
>
> On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:
>
>> I already have that.  I really don't understand but I bet it turns 
>> out
>
>> to be something stupid (on my part).  It is pretty frustrating but 
>> for
>
>> now they get no images!  Thanks for the reply.
>>
>> Jen
>
>
> Does http://server/images/myimage.gif work?
>
>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtQS5W126qUNSzvURArXWAJ4iQZnAk3PCvPOHJ/AYfoZZ2uR1IACcD92B
n1CyuDHGgXRAqOo8/Srfnz8=
=kbxT
-END PGP SIGNATURE-

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


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



Re: Simple question, but can't figure out answer

2006-07-12 Thread David Smith

Hi.

I've been lurking on this thread for a while this morning.  Here's a few 
things you might want to consider


1. Your perl script to serve up images is pulling from /images according 
to what was posted.  Given that perl probably isn't chrooted to the 
directory your webapp is in, the image you are trying to access needs to 
be at /images/icc-logo.gif relative to the unix filesystem root, not 
tomcat's webapps/ROOT or any other webapps folder.


2. If you drop the HTML page test and just attempt to access the image 
directly via http://localhost/path/to/image.gif, what error do you get?


3. I take it you have the perl script for serving up images mapped to 
icc-logo.gif somehow in your config?  I'd be interested to see that part 
of your setup.


--David

Mead, Jennifer L - VSCM wrote:


I already have that.  I really don't understand but I bet it turns out
to be something stupid (on my part).  It is pretty frustrating but for
now they get no images!  Thanks for the reply.

Jen 


-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 4:31 PM

To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ahhh...

and in webapps/ROOT/

create a directory called WEB-INF (please note capitals) that should fix
your problem...

Regards

Andrew

On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:

 

What this does is draw the box where the image should be.  When I 
right click on it and look at the properties and it finds the right 
file.

Just thought someone else would have ran into this 
   



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDShW126qUNSzvURAgtxAJwPa2jrrkN0241hVlxaxDf+eZd1bgCfbfSl
5pIOXiiNKc5pHCZHpqZlO08=
=haVp
-END PGP SIGNATURE-

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


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

 




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



Re: Simple question, but can't figure out answer

2006-07-12 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

No I am really confused

Your server name is  ...

and looking at your perl code, you were trying to get to an image  
called icc-logo.gif

 http:///images/icc-logo.gif
replace  with the name of your server

This SHOULD display the gif...

if your tomcat is installed in /usr/local
then I would expect at least the following files to exist

/usr/local/tomcat/
/usr/local/tomcat/webapps/
/usr/local/tomcat/webapps/ROOT/
/usr/local/tomcat/webapps/ROOT/images/
/usr/local/tomcat/webapps/ROOT/images/icc-logo.gif
/usr/local/tomcat/webapps/ROOT/WEB-INF/

IF not - then we need to describe exactly what you have

Are you sure you are only running Tomcat on this box?

what does "ps auxw" say?

Andrew



On 12/07/2006, at 4:10 PM, Mead, Jennifer L - VSCM wrote:


Nope, where and what is it trying to display?

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 7:08 AM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer


On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:

I already have that.  I really don't understand but I bet it turns  
out


to be something stupid (on my part).  It is pretty frustrating but  
for



now they get no images!  Thanks for the reply.

Jen



Does http://server/images/myimage.gif work?





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


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



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtQS5W126qUNSzvURArXWAJ4iQZnAk3PCvPOHJ/AYfoZZ2uR1IACcD92B
n1CyuDHGgXRAqOo8/Srfnz8=
=kbxT
-END PGP SIGNATURE-

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



Re: Simple question, but can't figure out answer

2006-07-12 Thread Pid
Is tomcat actually configured to serve the image directory?

Do you have your logging ramped up?

Try enabling an AccessLogValve if you haven't already.


Mead, Jennifer L - VSCM wrote:
> Nope, where and what is it trying to display? 
> 
> -Original Message-
> From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 12, 2006 7:08 AM
> To: Tomcat Users List
> Subject: Re: Simple question, but can't figure out answer
> 
> 
> On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:
> 
>> I already have that.  I really don't understand but I bet it turns out
> 
>> to be something stupid (on my part).  It is pretty frustrating but for
> 
>> now they get no images!  Thanks for the reply.
>>
>> Jen
> 
> 
> Does http://server/images/myimage.gif work?
> 
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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



RE: Simple question, but can't figure out answer

2006-07-12 Thread Mead, Jennifer L - VSCM
Nope, where and what is it trying to display? 

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 7:08 AM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer


On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:

> I already have that.  I really don't understand but I bet it turns out

> to be something stupid (on my part).  It is pretty frustrating but for

> now they get no images!  Thanks for the reply.
>
> Jen


Does http://server/images/myimage.gif work?





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


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



Re: Simple question, but can't figure out answer

2006-07-12 Thread Andrew Miehs


On 12/07/2006, at 4:01 PM, Mead, Jennifer L - VSCM wrote:


I already have that.  I really don't understand but I bet it turns out
to be something stupid (on my part).  It is pretty frustrating but for
now they get no images!  Thanks for the reply.

Jen



Does http://server/images/myimage.gif work?





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



RE: Simple question, but can't figure out answer

2006-07-12 Thread Mead, Jennifer L - VSCM
I already have that.  I really don't understand but I bet it turns out
to be something stupid (on my part).  It is pretty frustrating but for
now they get no images!  Thanks for the reply.

Jen 

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 4:31 PM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ahhh...

and in webapps/ROOT/

create a directory called WEB-INF (please note capitals) that should fix
your problem...

Regards

Andrew

On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:

>
> What this does is draw the box where the image should be.  When I 
> right click on it and look at the properties and it finds the right 
> file.
> Just thought someone else would have ran into this 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDShW126qUNSzvURAgtxAJwPa2jrrkN0241hVlxaxDf+eZd1bgCfbfSl
5pIOXiiNKc5pHCZHpqZlO08=
=haVp
-END PGP SIGNATURE-

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


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



Re: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ahhh...

and in webapps/ROOT/

create a directory called WEB-INF (please note capitals) that should  
fix your problem...


Regards

Andrew

On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:



What this does is draw the box where the image should be.  When I  
right

click on it and look at the properties and it finds the right file.
Just thought someone else would have ran into this 


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDShW126qUNSzvURAgtxAJwPa2jrrkN0241hVlxaxDf+eZd1bgCfbfSl
5pIOXiiNKc5pHCZHpqZlO08=
=haVp
-END PGP SIGNATURE-

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



Re: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 11/07/2006, at 11:53 PM, Mead, Jennifer L - VSCM wrote:




What this does is draw the box where the image should be.  When I  
right

click on it and look at the properties and it finds the right file.
Just thought someone else would have ran into this 


And where is your image on the disk?

./tomcat/webapps/ROOT/images ?

Looks as if it simply cant find it...

Andrew

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtDPuW126qUNSzvURAqsaAJ9sPOCAL+bhEP2yC5QHU74H9/y5IwCgjIgI
q7JCUSODlyeQgMZ+ME9N8Ks=
=EAuh
-END PGP SIGNATURE-

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



RE: Simple question, but can't figure out answer

2006-07-11 Thread Mead, Jennifer L - VSCM
Ok, it is something with my unix environment because I just pointed my
code to the same gif on my windows box and up it comes!  All code is
fine, which I suspected because I have tried so many variations of it
something had to work.  Not sure what it could be but maybe I actually
don't know where my image directory is.  Even though I am giving it a
fully qualified path, there must be a default image directory somewhere?
Not sure.

Jen 

-Original Message-
From: Mead, Jennifer L - VSCM [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 2:53 PM
To: Tomcat Users List
Subject: RE: Simple question, but can't figure out answer

Oh yes tomcat works for any language CGI, you need to go into the conf
files and uncomment a few things but it works.  Not recommended because
it bypasses the security built into tomcat.

Here is a sample code with the img tag inserted:

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


#
# script:ot_main.pl - main entry page into ICC outage tracker tool
#
# purpose:   a cgi script that calls pages that insert, display and
update
#outage tracker records for ICC
#
# links: ot_entry_form.pl - page to enter outage records
#ot_view_all.pl -   page to view all outage records in
database
#


#

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

$|=1 ;

$q = new CGI;
print $q->header("text/html"),
  $q->start_html("ICC Outage Tracker CGI Tool "); print
$q->h1=>("ICC Outage Tracker CGI Tool "),
  $q->h2,
  $q->hr,
  $q->img({-src=>'icc-logo.gif'}),
  $q->p,
  end_html;
  print "";
  print "Enter a New Outage Incident";
  print p;
  print "";
  print "View Recorded Outage Incidents";
  print p;


What this does is draw the box where the image should be.  When I right
click on it and look at the properties and it finds the right file.
Just thought someone else would have ran into this 

Jen

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 11, 2006 2:27 PM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

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 '';

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]


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


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



RE: Simple question, but can't figure out answer

2006-07-11 Thread Mead, Jennifer L - VSCM
Oh yes tomcat works for any language CGI, you need to go into the conf
files and uncomment a few things but it works.  Not recommended because
it bypasses the security built into tomcat.

Here is a sample code with the img tag inserted:

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


#
# script:ot_main.pl - main entry page into ICC outage tracker tool
#
# purpose:   a cgi script that calls pages that insert, display and
update
#outage tracker records for ICC
#
# links: ot_entry_form.pl - page to enter outage records
#ot_view_all.pl -   page to view all outage records in
database
#


#

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

$|=1 ;

$q = new CGI;
print $q->header("text/html"),
  $q->start_html("ICC Outage Tracker CGI Tool ");
print $q->h1=>("ICC Outage Tracker CGI Tool "),
  $q->h2,
  $q->hr,
  $q->img({-src=>'icc-logo.gif'}),
  $q->p,
  end_html;
  print "";
  print "Enter a New Outage Incident";
  print p;
  print "";
  print "View Recorded Outage Incidents";
  print p;


What this does is draw the box where the image should be.  When I right
click on it and look at the properties and it finds the right file.
Just thought someone else would have ran into this 

Jen

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 2:27 PM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

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 '';

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]


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



Re: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

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 '';

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]



RE: Simple question, but can't figure out answer

2006-07-11 Thread Mead, Jennifer L - VSCM
I am using perl CGI because that is what the company wants.  I haven't
used jsp ever, but I am researching it to teach myself.  Then I could
introduce it and convince my boss to let me develop in it.

I have used the  page over and over to no avail.  That is why I was
concerned that it was a browser setting or tomcat specific.  It should
work.

Yes we have tomcat installed.  I should have realized that most folks on
this list are jsp programmers and NOT perl CGI.  Oh bother.

Thanks for the reply,
Jennifer 

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 2:09 PM
To: Tomcat Users List
Subject: Re: Simple question, but can't figure out answer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

More stupid question...

1 - Why are you using perl when you have tomcat - can't you just use a
jsp?
2 - why can't you use an  tag? and have tomcat deliver the page...
3 - You are using tomcat aren't you?


Confused

Andrew

On 11/07/2006, at 11:00 PM, Mead, Jennifer L - VSCM wrote:

>
> Hello,
>
> I am trying to create some cgi pages for my company.  Or I should say 
> I have created some and now just want to add a header graphic in the 
> main page.  Nothing fancy.  However, I cannot get my image to display,

> no matter how I embed the darned thing.  I can't even get regular html

> to display from our installation.  Is it a configuration thing?  Or am

> I so green I just don't get it?  (feel free to flame).  Here is the 
> only code I can get running that displays the image:
>
> #!/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;
>
>
>

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtBNWW126qUNSzvURAogbAJ9HHFxXIVUpt+xZFUKSMO08P6P2TgCeL1+a
DMEBngY+kTShxsFNyHjz7yM=
=EoBF
-END PGP SIGNATURE-

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


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



Re: Simple question, but can't figure out answer

2006-07-11 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

More stupid question...

1 - Why are you using perl when you have tomcat - can't you just use  
a jsp?

2 - why can't you use an  tag? and have tomcat deliver the page...
3 - You are using tomcat aren't you?


Confused

Andrew

On 11/07/2006, at 11:00 PM, Mead, Jennifer L - VSCM wrote:



Hello,

I am trying to create some cgi pages for my company.  Or I should  
say I
have created some and now just want to add a header graphic in the  
main

page.  Nothing fancy.  However, I cannot get my image to display, no
matter how I embed the darned thing.  I can't even get regular html to
display from our installation.  Is it a configuration thing?  Or am  
I so
green I just don't get it?  (feel free to flame).  Here is the only  
code

I can get running that displays the image:

#!/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;





-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEtBNWW126qUNSzvURAogbAJ9HHFxXIVUpt+xZFUKSMO08P6P2TgCeL1+a
DMEBngY+kTShxsFNyHjz7yM=
=EoBF
-END PGP SIGNATURE-

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



Re: Simple question, but can't figure out answer

2006-07-11 Thread Avi Deitcher
Jen,

Unless there is a particular reason (e.g. dynamically created images),
why are you reading image files directly in Perl, then dumping the
output? You should just use CGI to generate HTML that looks like this:



Even if you want to dynamically *choose* the image, you are better off
having CGI/JSP/etc. dynamically fill in the src  or  rather than
actually literally feeding the image.



Mead, Jennifer L - VSCM wrote:

>Hello,
>
>I am trying to create some cgi pages for my company.  Or I should say I
>have created some and now just want to add a header graphic in the main
>page.  Nothing fancy.  However, I cannot get my image to display, no
>matter how I embed the darned thing.  I can't even get regular html to
>display from our installation.  Is it a configuration thing?  Or am I so
>green I just don't get it?  (feel free to flame).  Here is the only code
>I can get running that displays the image:
>
>#!/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;
>
>
>All good, it looks fine.  However I cannot use this because then I
>cannot display anything else, or at least I cannot figure out how to.
>Any help is appreciated.  I have been trying all kinds of things, so
>many I cannot recall half of the things I have tried.  Truly frustrated
>from lack of knowledge.
>
>Regards,
>Jen
>
>Jennifer L Mead
>ICC Operations Sr Sys Engineer
>Con-way Enterprise Services
>503.450.8578   desk
>503.550.6589   cell
>[EMAIL PROTECTED]
>
>
>
>  
>

-- 
__
Avi Deitcher
[EMAIL PROTECTED]



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



Simple question, but can't figure out answer

2006-07-11 Thread Mead, Jennifer L - VSCM

Hello,

I am trying to create some cgi pages for my company.  Or I should say I
have created some and now just want to add a header graphic in the main
page.  Nothing fancy.  However, I cannot get my image to display, no
matter how I embed the darned thing.  I can't even get regular html to
display from our installation.  Is it a configuration thing?  Or am I so
green I just don't get it?  (feel free to flame).  Here is the only code
I can get running that displays the image:

#!/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;


All good, it looks fine.  However I cannot use this because then I
cannot display anything else, or at least I cannot figure out how to.
Any help is appreciated.  I have been trying all kinds of things, so
many I cannot recall half of the things I have tried.  Truly frustrated
from lack of knowledge.

Regards,
Jen

Jennifer L Mead
ICC Operations Sr Sys Engineer
Con-way Enterprise Services
503.450.8578desk
503.550.6589cell
[EMAIL PROTECTED]