-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Dear JServ users and interested parties,

    For the past week an associate and myself have been trying to configure
JServ to use some servlets that make JNI calls.  To be brutally honest the
process has been extremely time consuming.

I'm writing this in the hope that others don't go through the same growing
pains we did in trying to get it to work.  It does work - I've seen it
happen!

As an intro, it seems (and please correct me if I'm wrong) that you can set
classpath and system variables on a number of levels and you need to be
aware of how changes to a level effect the final result.
There are 3 main levels :
1. System level, set via httpd.conf.
2. The JServ level, set via jserv.properties.
3. Repository level, set via the repository file for the zone.

Here's a series of steps that will make it easier for you (hopefully) :
1. Set your system level (i.e. httpd.conf file) to have a LD_LIBRARY_PATH
that has the path to your library files.
SetEnv LD_LIBRARY_PATH /paths-to-library-files/

2. Include in the library files on your JServ level :
wrapper.env=LD_LIBRARY_PATH=/paths-to-library-files/
wrapper.env.copyall=true   (I'm not sure if this is necessary, but heck - it
works and I'm not going to argue with that!)

3. Set your classpath on the system level :
System level - In httpd.conf :
SetEnv CLASSPATH /paths-to-your-classes-and-or-servlets/

4. Set your classpath on the JServ level :
wrapper.classpath=/usr/local/jserv/lib/ApacheJServ.jar (Path to JServ stuff)
wrapper.classpath=/usr/JSDK2.0/lib/jsdk.jar (Path to JSDK stuff)
wrapper.classpath=/paths-to-your-classes-and-or-servlets/
wrapper.classpath=/path-to-servlet-using-JNI/theFile.class
wrapper.classpath=/path-to-class-with-JNI-calls/theFile.class

5. Set your classpath of the Repository level :
repositories=/path-to-zone-classes-and-or-servlets/

You'll start to see some results if all this is set-up correctly.
A few things to check if things aren't happening the way you'd like :
1.  Make sure that your system level stuff is correct by checking the
CLASSPATH of the user the daemon runs under.
2.  Print out your classpath and library path that is being recognised by
Apache via a CGI script.

I hope this helps everyone in future.

To all members of the mailing list - I hope if and when you solve any
problems with Apache, and there is no easy-to-read, simple, clear and
concise document to be found - you send an email in to summate the problem
and how to solve it.

C'mon this is open source - let's try and make it easier for others!

Cheers

    Mat



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to