Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Call jar from Perl/CGI on Apache Server with Linux

by blue_cowdawg (Monsignor)
on Mar 18, 2013 at 14:11 UTC ( #1024055=note: print w/replies, xml ) Need Help??

in reply to Call jar from Perl/CGI on Apache Server with Linux

      I am running my web app using Perl/CGI on Apache server (Not Tomcat) under Linux.

Why are you not using a web container like Tomcat? Or JBoss? Or Geronimo?

This is a rather bizarre implementation to say the least. Not one that I'd recommend in any form of production code. I just did a super search and came up empty, but somewhere in the Monastery catacombs exists a troubleshooting checklist for issues with CGI. Off the top of my head I'd suggest checking the following:

  • File permissions: quite frequently the CGI environment is running as a user other than what you are running as when executing from the command line.
  • Server Logs: Usually a font of information as to "why this ain't working."
  • Put debugging code into your CGI

To that last point I always recommend you run the following code as a CGI (or some form of it) and quickly remove it from your production environment:

#!/usr/bin/perl -w use strict; use CGI qw/ :all /; use CGI::Carp qw/ fatalsToBrowser /; print header,start_html; print h1('Environmental Variables'); print ul(map{li($_ . ": " . $ENV{$_})} sort keys %ENV); print h1('CGI Parameters'); print ul(map{li($_ . ": ". param($_))} sort param()); print end_html; exit(0);

This code will give you some idea of what is going on in you CGI environment.

Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024055]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-10-17 06:59 GMT
Find Nodes?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...

    Results (90 votes). Check out past polls.