Hello Every one...
Here i have a problem which may have lots of interest among all the
java folks on networking. I had an
applet which opens a Socket connection to a Server on its running port. I am using a PrintWriter object to write the protocol
String like GET/index.html HTTP/1.1 to it. Then i have one BufferedReader to get all the headers from index.html. My index.html file actually in its doGet() method writes an object to an like say
Coming back to my applet, i after reading the headers using BufferedReader object now need to read the object. So i am using ObjectInputStream on the same port and trying to initialize this.
But i am encountering a StreamCorruptedException..
So i tried with closing the BufferedReader after i finish reading the headers... but the Socket is also closed with this statement.
So can any one please suggest me how to solve this problem...
I am here by giving my entire code as what i worked out for
Applet code
***********
*************************************************
Servlet code
************
*************************************************
So if any one finds a good solution or suggest me how can we get about this... please mail me at
karthik@electricangels.com....
Hope an extended hand on this issue...
Regards,
karthik
[ Inserted CODE tags -- PdH ]
[ January 17, 2003: Message edited by: Peter den Haan ]