developerinlondon
Programmer
I am having a strange problem trying to invoke a PHP script from within a java servlet.
What I want to do is the following -
I have a java servlet that is capable of fetching multiple URLs simultaneously using threads. I am using this servlet to execute a PHP script. What I want to happen is
a) the servlet invokes the php script and opens a connection. Writes all the header information/parameters to it and waits for a reply.
b) the php script does its own work and returns 1 or nothing.
c) control flows on in the java servlet and it reports the work has been done.
What is happening however is the following-
a) the servlet calls the php script and opens a connection. Writes all the header information/parameters to it and waits for a reply.
b) the php script does NOT do its work, instead it waits...
c) the java servlet waits until the 'timeout' time to read something from the php script and reports a timeout and finishes.
d) the php script resumes what it was suppose to do and finishes its work.
I am totally dumbfound as to why the php is acting in this regard... (I know this may be php related too but I thought people with java knowledge would have a better idea whats going on here).
thanks in advance.
nayeem
What I want to do is the following -
I have a java servlet that is capable of fetching multiple URLs simultaneously using threads. I am using this servlet to execute a PHP script. What I want to happen is
a) the servlet invokes the php script and opens a connection. Writes all the header information/parameters to it and waits for a reply.
b) the php script does its own work and returns 1 or nothing.
c) control flows on in the java servlet and it reports the work has been done.
What is happening however is the following-
a) the servlet calls the php script and opens a connection. Writes all the header information/parameters to it and waits for a reply.
b) the php script does NOT do its work, instead it waits...
c) the java servlet waits until the 'timeout' time to read something from the php script and reports a timeout and finishes.
d) the php script resumes what it was suppose to do and finishes its work.
I am totally dumbfound as to why the php is acting in this regard... (I know this may be php related too but I thought people with java knowledge would have a better idea whats going on here).
thanks in advance.
nayeem