You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Gariboli, Sam" <Sa...@sawater.com.au> on 2003/11/20 07:17:53 UTC

[users@httpd] CGI and Java

Hello,

 

I have a Solaris 9 server running the Apache httpd server (1.3.27). What
I am trying to do is return some html (which is generated from a java
program on the Solaris 9 server ) to the client browser via the CGI.
Accessing the "test-cgi" test script from the client browser returns the
required environment information so I can assume the CGI is configured
correctly. Running the java program on the Solaris 9 server by typing in
"java foobar" produces the correct html and sends it to standard output(
the command window). I'm using a csh to execute the java program via the
CGI. I'm able to successfully return the output "HELLO WORLD" from the
HelloWorld.java program through the CGI but when I run the foobar.java
program it seems to fall over when it gets to the following line:

Connection conn = DriverManager.getConnection
("jdbc:oracle:oci:@sdeprod","foo","bar");

But as I mentioned earlier the exact same program works when run
separately on the server.

It seems to be something with the CLASSPATH and LD_LIBRARY_PATH
environment variables and so I set these up in the httpd.conf file using
the SetEnv directives but still no luck.

Can anyone provide any suggestions on what the problem may be?

 

Thanks

Sam

 



*******South Australian Water Corporation disclaimer*******

"This e-mail and any attachments to it may be confidential and/or subject to legal professional privilege. If you are not the intended recipient you may not disclose or use the information contained in the message in any way. If received in error please delete all copies and contact the sender by return e-mail. No warranty is made that any attachments are free from viruses. It is the recipient's responsibility to establish its own protection against viruses and other damage."