-
1. Re: Problem while Communicating between simple java class an
shashank.g Mar 24, 2004 4:02 AM (in response to shashank.g)Hi Guys,
I was able to solve the communication problem between java client and HTTP Sevlet.
My Servlet had these steps in sequence:
String strReqType = req.getParameter("requestType");
ObjectInputStream ois= new ObjectInputStream(req.getInputStream());
So if you try creating an ObjectInputStream object after an request.getParameter() it will thow an java.io.EOFException.
To solve this problem I changed my flow by creating the ObjectInputStream object prior to doing the request.getParameter() operation as given below.
ObjectInputStream ois= new ObjectInputStream(req.getInputStream());
String strReqType = req.getParameter("requestType");
Thanks and Regards,
Shashank -
2. Re: Problem while Communicating between simple java class an
lowecg2004 Jun 12, 2007 4:56 AM (in response to shashank.g)Just been bitten by this in JBoss 4.2.0.GA - I can't believe this is still around after all this time.
My code used to work just fine under Tomcat 5.5.17.
Thanks to the original author of this post for persevering and posting a solution!