You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Di...@eurotours.at on 2003/11/20 08:35:51 UTC

[users@httpd] Antwort: [users@httpd] CGI and Java

Use the cp option from the java programm and set the lib from your oracle
driver and so on. The valid parameters on 1.4.1 are:

Usage: java [-options] class [args...]
           (to execute a class)
   or  java -jar [-options] jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp -classpath <directories and zip/jar files separated by ;>
                  set search path for application classes and resources
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -showversion  print product version and continue
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions

regards Dietmar







"Gariboli, Sam" <Sa...@sawater.com.au> am 20.11.2003 07:17:53

Bitte antworten an users@httpd.apache.org

An:    <us...@httpd.apache.org>
Kopie:
Thema: [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."

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org







---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org