Hello,
I'm beginning to use php/Java bridge with Tomcat 7.
My servlet got a servicePage(HttpServletRequest, HttpServletResponse)
method, which returns a String. That String depends on the value of a
"cmd" parameter in HttpServletRequest.
Could please anyone tell me what's wrong with my code ?
PHP SIDE :
$session = java_session();
$faqAdminServlet = java_context()->getServlet();
if (IsSet($_REQUEST["cmd"])) {
java_context()->getHttpServletRequest()->setAttribute("cmd",
$_REQUEST["cmd"]);
}
$nextPage =
$faqAdminServlet->servicePage(java_context()->getHttpServletRequest(),
java_context()->getHttpServletResponse());
header("Location: " . $nextPage);
TOMCAT SIDE :
public String servicePage(HttpServletRequest req, HttpServletResponse
res) throws ServletException, IOException {
String nextPage;
/*
Some code setting up nextPage, depending on the value of
req.getParameter("cmd")
*/
return nextPage;
}
I get the following error :
Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke
failed: [[o:PhpJavaServlet]]->servicePage([o:RemoteHttpServletRequest],
[o:RemoteHttpServletResponse]). Cause: java.lang.NoSuchMethodException:
servicePage([o:RemoteHttpServletRequest], [o:RemoteHttpServletResponse])
Any help would be greatly appreciated !
Ben
|