Exception on library in Tomcat Apache web application no TLDs found
<p>I just started learning Apache Tomcat and I just even recently Installed it, Am trying to run a particular Java program/class that waits/listens for data from a php post request and below is the code. I call this class <code>Listener.java</code></p>

<pre><code> package matchfaces;

 public class Listener {

        public static final String JAVABRIDGE_PORT = "1699";//8080
        static final php.java.bridge.JavaBridgeRunner runner =
        php.java.bridge.JavaBridgeRunner.getInstance(JAVABRIDGE_PORT);

        public static void main() {
    // TODO code application logic here
    try {
            System.loadLibrary("facesdk");
            int res = FSDK
                            .ActivateLibrary("LICENCE KEY");
            FSDK.Initialize();
            FSDK.SetFaceDetectionParameters(true, true, 384);
            FSDK.SetFaceDetectionThreshold(5);

            if (res == FSDK.FSDKE_OK) {
                    System.out.println("FaceSDK activated\n");
            } else {
                     System.out.println("Error activating FaceSDK: " + res + "\n");
            }
    } catch (java.lang.UnsatisfiedLinkError e) {
             System.out.println("exception " + e.getMessage());
    }

    runner.waitFor();
}
</code></pre>

<p>}</p>

<p>After much research I tried a couple of things but now, it seems the libraries I need are not being load and thus throwing an exception. My <code>web.xml</code> is as follows </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
&lt;context-param&gt;
    &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
    &lt;param-value&gt;Development&lt;/param-value&gt;
&lt;/context-param&gt;


&lt;servlet&gt;
    &lt;servlet-name&gt;Match Faces&lt;/servlet-name&gt;
    &lt;servlet-class&gt;matchfaces.Listener&lt;/servlet-class&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Match Faces&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/matchfaces&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

&lt;session-config&gt;
    &lt;session-timeout&gt;
        30
    &lt;/session-timeout&gt;
&lt;/session-config&gt;

&lt;listener&gt;
    &lt;listener-class&gt;ViewHandler.handler&lt;/listener-class&gt;
&lt;/listener&gt;

&lt;welcome-file-list&gt;
    &lt;welcome-file&gt;faces/index.xhtml&lt;/welcome-file&gt;
&lt;/welcome-file-list&gt;
</code></pre>

<p></p>

<p>So I used a listener so On Tomcat start server it would fire the web application java class <code>Listener.java</code></p>

<pre><code>public class handler implements javax.servlet.ServletContextListener{

@Override
public void contextInitialized(ServletContextEvent sce) {
     try {
         Listener listen = new Listener();
         listen.main();
     } catch (InterruptedException ex) {
         Logger.getLogger(Listener.class.getName()).log(Level.SEVERE, null, ex);
     }
}

@Override
public void contextDestroyed(ServletContextEvent sce) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}


 }
</code></pre>

<p>The error I get is this</p>

<blockquote>
  <p>exception no facesdk in java.library.path </p>
</blockquote>