But..
if I comment out the try{}catch{} block, it works fine. Are there any
differneces regarding objectoutinputstream class between jdk1.1 and 1.2

Thanks in advance.
Hemchand.

-----Original Message-----
From: Matt Sales [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 10, 2000 10:41 AM
To: Java-Servlets
Subject: Re: Serialization in JSev servlets.


Apache JServ only works with JDK1.1.

----- Original Message ----- 
From: Aluru, HemachandX <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 10, 2000 1:23 PM
Subject: Serialization in JSev servlets.


> 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");
>  file://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");
>         file://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.
> 
> 
> 
> 
> ------------------------------------------------------------
> To subscribe:    [EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:       [EMAIL PROTECTED]
> 



------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]




------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to