JSP & IO - Object I/O
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Trupti_Mehta
Posted On:   Friday, May 11, 2001 12:47 AM

Enter your Hi, I have a bean that writes & reads objects stored in a flat file. I need to store/retrieve objects fro mthat file using the bean dynamically at run time. If I use normal java file & write & read static objs, it works perfect. But the same code when I add to a JSP page, it will write dynamically but for reading it will read just first record & then it throws StreamCorruptedException. I need to store login Info in this flat file & retrieve often. How d oi overcome this problem. The same functions are sued of the bean by JSP & normal java code. It can retrieve objs if stored normally. If i try to store objs dynamically at run time, it will store without any exceps. but will read just first obj & throw Stre   More>>

Enter your
Hi,

I have a bean that writes & reads objects stored in a flat file. I need to store/retrieve objects fro mthat file using the bean dynamically at run time. If I use normal java file & write & read static objs, it works perfect. But the same code when I add to a JSP page, it will write dynamically but for reading it will read just first record & then it throws StreamCorruptedException. I need to store login Info in this flat file & retrieve often. How d oi overcome this problem. The same functions are sued of the bean by JSP & normal java code. It can retrieve objs if stored normally. If i try to store objs dynamically at run time, it will store without any exceps. but will read just first obj & throw StreamCorruptedException.

Can anyone please focus light on this problem. Please write to me at terry_513@rediffmail.com


Thanks in advance.

Truptifull question here

   <<Less

Re: JSP &amp; IO - Object I/O

Posted By:   Tim_Rohaly  
Posted On:   Friday, May 11, 2001 07:33 PM

Please read
http://www.jguru.com/faq/view.jsp?EID=76047.
My guess is that you are seeing the problem listed
where your objects were serialized using JDK 1.2+ and are
trying to read them with JDK 1.1. Check the JDK version of
your JSP engine.
The FAQ at http://www.jguru.com/faq/view.jsp?EID=13165
shows how to solve this problem.
About | Sitemap | Contact