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!

1
  • Is there something in the error log (or the console window) of the tomcat that might be related to the problem? Commented Jul 29, 2009 at 9:55

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.