Please follow the manual: http://php-java-bridge.sourceforge.net/pjb/webapp.php
The above has been tested in TomEE, which is based on Tomcat
Please note that Tomcat 8 still contains an error. As a workaround, you will need to add an empty java directory to the zip file JavaBridgeTemplate.war:
drwxr-xr-x 0 31-Oct-2010 15:24:24 WEB-INF/ -rw-r--r-- 239 31-Oct-2010 15:20:30 WEB-INF/weblogic.xml drwxr-xr-x 0 31-Oct-2010 15:24:24 WEB-INF/lib/ -rw-r--r-- 436954 31-Oct-2010 15:24:24 WEB-INF/lib/JavaBridge.jar -rw-r--r-- 58673 31-Oct-2010 15:24:24 WEB-INF/lib/php-script.jar -rw-r--r-- 58252 31-Oct-2010 15:24:24 WEB-INF/lib/php-servlet.jar -rw-rw-r-- 3871 31-Oct-2010 15:24:50 index.php -rwxrwxr-x 19 31-Oct-2010 15:24:50 test.php -rw-rw-r-- 1779 31-Oct-2010 15:24:50 WEB-INF/web.xml drwxr-xr-x 0 25-Apr-2016 20:53:10 java/
source share