Any Idea about where it could be wrong???
Hi,
I wrote a couple of servlets and java serialization is adopted for the
communication between servlets.
I used following block of try{}catch{} statements just to check whether
the servlet received data either from the browser of another servlet.
try{
InputStream is = req.getInputStream();
log("got Input Stream");
//ObjectInputStream reader = new
ObjectInputStream(req.getInputStream());
ObjectInputStream reader = new ObjectInputStream(is);
log("Object Input stream created");
obj =reader.readObject();
log("Got object from sports Servlet");
}
catch( java.io.StreamCorruptedException e)
{
log("Unable to receive object from Pservlet "+e.toString());
log("Received data from the user- So proceed to process user's
request");
//e.printStackTrace();
}
catch( java.lang.ClassNotFoundException e)
{
log("Class Not Found Exception ");
}
if (obj == null)
{
log("No object received from Sport servlet. So go and serve
the client");
.......Do Some thing.
}
else
{
......Do some thing
}
This works fine under JRUN and ServletExec. Under Apachi JServ the
servlet gets hanges as soon as it reaches to the instruction
ObjectInputStream reader = new ObjectInputStream(is); After a long
pause, it enter else condition and no trace of servlet execution.
What could be the reason. Same code works on other servlet engines. The
complete code is compiled under JDK1.2 and JSDK2.0.
Thanks
Hemchand.
-----Original Message-----
From: Jon Stevens [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 10, 2000 12:34 PM
To: Java-Servlets
Subject: Re: Serialization in JSev servlets.
on 10/10/2000 10:40 AM, "Matt Sales" <[EMAIL PROTECTED]> wrote:
> Apache JServ only works with JDK1.1.
WRONG. that isn't true at all. Apache JServ only works with JSDK 2.0. That
is the only requirement.
-jon
--
http://scarab.tigris.org/ | http://noodle.tigris.org/
http://java.apache.org/ | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/ | http://www.sourcexchange.com/
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]