• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet-Servlet communication EOFException

 
Andres Del Pino
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! i´ve been searching and searching through forums because it seems this problem is very common, but none of the solutions i´ve seen so far suits me, so i´m here looking for some help because i´ve been stuck one week with this. First of all sorry if my english isn´t the best... i´m a bit rusty...

Well, i had some code that worked perfectly, but i needed to perform some changes because i needed the servlet to send more info to the applet, and here started the problems, when i made the changes it started to throw EOFException when i was trying to read the InputStream, and furthermore when i came back to the original code it started to throw the exception in the same place too

So here i am... don´t know what to do now and i entrust to you to give me some tips.

Here comes some code.

Applet:


Servlet:



Thank you for your time
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't close any of the streams until all I/O has been done.
 
Andres Del Pino
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i forgot to say this is the original code, the one that worked, so it worked closing the streams like i do but i´ll try doing what you say too. Thank you for the fast reply
 
Andres Del Pino
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i´ve been running some test in another computer, and that code simply works, but it doesn´t work in the machine i usually work.

Maybe someway the stream get corrupt? the info i´ve been trying to send and started throwing the exception may still be in the stream? I don´t know what to think right now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic