tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Clark L. Naldoza" <njcl...@ntsp.nec.co.jp>
Subject Re: Environment entries?
Date Mon, 11 Dec 2000 23:45:56 GMT
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: njclark@ntsp.nec.co.jp                        \   \

Mime
View raw message