Hello Amandeep, Hope you can help me. I am running Tomcat version 3.1 on HPUX 11.0 with Apache. What I am trying to do is invoke a C function (using JNI) from a servlet. The C function is compiled into a shared library. Now, if I write a simple JAVA application, use JNI and execute the C function, everything works file. But, then if I change it from being an application to a servlet, then it fails. Also, the reason is not that it is not able to find and load the library (as if I remove the library or rename it, it gives an error indicating it was unable to load the library). But, the error indicates it was unable to locate the method that I am trying to invoke. In fact, going through the getMethods function, I listed all the methods loaded and available for the class, and the native C function is also listed as one of the functions that can be called. But, that may just be because the native C function is listed in the class definition as per JNI requirements. Your email is the first one where I know that somebody has successfully implemented JNI in a servlet. Could you share if you had any problems in your effort. Also, if you could take a few minutes, I could email you my test example (a very simple login example) to take a look if I am missing something obvious. Regards and Thanks in advance -- Manoj Thakur > > To: <[EMAIL PROTECTED]> > Subject: Can I set LD_LIBRARY_PATH for each virtual host > From: "Amandeep Jawa" <[EMAIL PROTECTED]> > Date: Tue, 17 Oct 2000 17:33:24 -0700 > Delivered-To: mailing list [EMAIL PROTECTED] > list-help: <mailto:[EMAIL PROTECTED]> > list-post: <mailto:[EMAIL PROTECTED]> > list-unsubscribe: <mailto:[EMAIL PROTECTED]> > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Organization: Imagelock, Inc. > Reply-To: [EMAIL PROTECTED] > Reply-To: "Amandeep Jawa" <[EMAIL PROTECTED]> > > > > Hi folks - > > For JNI purposes I have to have LD_LIBRARY_PATH set for my servlets. My > servlets seem to be able to make simple C calls so everything is Ok so far. > The problem is that I am setting the library path for the entire tomcat > installation when I'd really like to set it per virtual host or per servlet > context in server.xml. > > Does anyone know how to do this? > > Sorry if this is a well known solution but the FAQ is down which seems to be > pretty common! > > 'deep > > > -------------------------- > Amandeep Jawa > Imagelock, Inc. > -------------------------- > [EMAIL PROTECTED] > 1725 Montgomery St > San Francisco CA 94111 > > Work: 415 616 7262 (616 SAMBA) > Fax: 415 392 5382 > > http://www.imagelock.com Manoj Thakur Email: [EMAIL PROTECTED] Work: +1 856 866 1000 x4166 Fax: +1 856 866 0185 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]