I have two Tomcat WebApps. One is the web site written in PHP and second is Java Servlet. I have both in apache-tomcat-7.0.55/webapps folder. Problem is when I want to connect to Servlet from site I'm getting exception]
java.lang.NoSuchMethodExcetion: hello([o:PhpParserString]). Candidates: []
PHP:
define("JAVA_HOSTS", "ip_address");
define("JAVA_SERVLET", "/SearchEngine");
require_once("Java.inc");
if (strlen(qa_get('q'))) {
$javaresults = java_context()->getServlet()->hello(qa_get('q'));
}
Java:
public String hello(String str) throws SQLException {
System.out.println(str);
return str;
}
I can run site or servlet independently without problems on Tomcat but I can't connect Php site to servlet on the same server. When site was deployed in Apache Server and servlet was running on Tomcat through Eclipse everything was working fine, but now it is not.