Catherine Jung wrote:
> 
> Hi, one of my servlets needs to open a connection to a database, now, if I
> were accessing this database in a normal java program I'd need to have set
> an environment variable LD_LIBRARY_PATH to point to it's native
> librarys. How can I do something similar in a servlet?
> 
> It doesn't work just with the normal environment entries I would use for a
> plain java app, and it doesn't work using the following in my web.xml
> file. So can anyone enlighten me as to what I've done wrong/should be
> doing?
> 
> <env-entry>
>         <description>path to the objy librarys</description>
>         <env-entry-name>LD_LIBRARY_PATH</env-entry-name>
>         <env-entry-value>/opt/share/object5.2.3/solaris7/lib/</env-entry-value>
>         <env-entry-type>java.lang.String</env-entry-type>
> </env-entry>
> 
> Thanks,
> 
> Catherine

Hello Cat,


Perhaps you can try to load the library during the init method of your
main servlet...

i.e.
----
    init()
    {
         try
         {
            
System.load.("/opt/share/object5.2.3/solaris7/lib/libwhatever.so");
         }
         catch( Exception e )
         {
             e.printStackTrace();
         }
    }
----

Just a suggestion...;-)


Cheers,


John Clark
-- 
     /) John Clark Naldoza y Lopez                           (\
    / )    Software Design Engineer II                       ( \
  _( (_    _  Web-Application Development                    _) )_
 (((\ \>  /_>    Cable Modem Network Management System <_\  </ /)))
 (\\\\ \_/ /         NEC Telecom Software Phils., Inc.  \ \_/ ////)
  \       /                                              \       /
   \    _/  phone: (+63 32) 233-9142 loc. 3112            \_    /
   /   /  cellphone: (+63 919) 813-6274                     \   \
  /   / email: [EMAIL PROTECTED]                        \   \

Reply via email to