简体   繁体   中英

php java bridge not working on tomcat 6

I just installed the current Tomcat version on my mac because I wanted to try the PHP Java bridge.

I followed the guide here http://php-java-bridge.sourceforge.net/pjb/tomcat6.php but when I paste the xml config to the tomcat configuration file

<listener><listener-class>php.java.servlet.ContextLoaderListener</listener-class></listener>
<servlet><servlet-name>PhpJavaServlet</servlet-name><servlet-class>php.java.servlet.PhpJavaServlet</servlet-class></servlet>
<servlet><servlet-name>PhpCGIServlet</servlet-name><servlet-class>php.java.servlet.PhpCGIServlet</servlet-class>
<init-param><param-name>prefer_system_php_exec</param-name><param-value>On</param-value></init-param>
<init-param><param-name>php_include_java</param-name><param-value>On</param-value></init-param>
</servlet>
<servlet-mapping><servlet-name>PhpJavaServlet</servlet-name><url-pattern>*.phpjavabridge</url-pattern> </servlet-mapping>
<servlet-mapping><servlet-name>PhpCGIServlet</servlet-name><url-pattern>*.php</url-pattern></servlet-mapping>

nothing works anymore - all I get when I open localhost:8080 is "error 404 - resource() not found". If I leave out the above lines, at least I get the welcome page, but then the directory where I put the phpJavaBridge application only shows the resource() not found error.

I am pretty new to development with Tomcat, so I really have no idea how to fix that problem. Any help would be greatly appreciated!

Your Java Version is out of date. Use Sun Java 6 or above instead.

The 'NoClassDefFoundError' means that Sun's script api is missing. Search for script-api.jar and install that to get rid of this error.

deploy JavaBridge.war is easy https://sourceforge.net/projects/php-java-bridge/files/Binary%20package/php-java-bridge_6.2.1/php-java-bridge_6.2.1_documentation.zip

unzip php-java-bridge_6.2.1_documentation.zip,you wil find JavaBridge.war in the folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM