You might need to set the CLASSPATH for you java program directly
with the -classpath option from the CGI script. When the CGI is
run it is forked() off from the server process so it will get the
servers CLASSPATH not your shell CLASSPATH. This might be the
reason your class works in the shell and not in the CGI. You might
also want to check the web server error log to see if you see
error messages like "can't file classs ..." coming from the java
process (stderr from processes should be redirected to the server
error log by the web server).
I hope that helps
Mo DeJong
dejong cs.umn.edu
On Mon, 11 Jan 1999, Alexey Philimonov wrote:
> Hi!
>
> I'm running website on RedHat Linux 5.1+Apache 1.3.3 and got a problem
> trying to use Java program as CGI:
>
> - when I run java program from the shell as "java myclass" - output
> is ok
>
> - when I put the same command in shell script and run it - I
> perfectly get both script and Java output
>
> - when I try to get the same script thru http, I get only script output.
> None of Java output isn't present on the page.
>
> Question: what shall I do to make Java output reach Apache?
>
> best regards,
> Alexey
>
>