Troubles with transferring objects between servlet and applet using serialization.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Eugeny_Dzhurinsky
Posted On:   Friday, May 10, 2002 08:44 AM

Well, for example I have initialized LinkedList object, and I need to send in to applet using servlet. I create the OobjectOutputStream then write my LinkedList to it. LinkedList ll = new LinkedList(); ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream()); out.writeObject(ll); out.flush(); out.close(); then I make connection to server from my applet and try to get this object using readObject() method. And i'm getting the ClassNotFoundException, but I had imported the java.util.LinkedList library. Please give me the examples of working code, cuz examples a download from coreservlets.com are using String[] objects, but if i change the code to make it    More>>

Well, for example I have initialized LinkedList object, and I need to send in to applet using servlet.
I create the OobjectOutputStream then write my LinkedList to it.

			
LinkedList ll = new LinkedList();
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
out.writeObject(ll);
out.flush();
out.close();


then I make connection to server from my applet and try to get this object using readObject() method. And i'm getting the ClassNotFoundException, but I had imported the java.util.LinkedList library.

Please give me the examples of working code, cuz examples a download from coreservlets.com are using String[] objects, but if i change the code to make it working with LinkedList (or something else) a got ClassNotFoundException.    <<Less

Re: Troubles with transferring objects between servlet and applet using serialization.

Posted By:   AlessandroA_Garbagnati  
Posted On:   Friday, May 10, 2002 08:54 AM

Hi,

Are you using the Java Plug-In or the JVM that is included in the browser? IN the second case, I think that that object is not supported since JVM included in browser is 1.1 compliant.
About | Sitemap | Contact