File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes HTTP - tunneling and Objects.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "HTTP - tunneling and Objects.." Watch "HTTP - tunneling and Objects.." New topic
Author

HTTP - tunneling and Objects..

Ilja Smoli
Ranch Hand

Joined: Dec 02, 2001
Posts: 64
Hello...
I've done Http tunneling between servlet and applet. Servlet sends objects to applet using ObjectOutputStream writeObject() method. Question is:
I have a class lets say MyObject.
Than i create an instance of this like:

To get it in applet i have to cast this object to something like

So i have to have a copy of MyObject class located with applet on client side? Im I right?
And second question: is it possible to send few objects at once?
Thx in advance...
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1865
Hi Ilja
Yes you can send multiple objects in the stream following either of the following ways,
1. Create vector, arraylist , collection of the objects and send them at first shot
2. write multiple object by calling write() serveral times to the outputstream
In either case you have to remember how you are sending the objects and recieve them appropriately.
ALso, make sure your objects are Serializable (or Externalizable)..
Regards
Maulin


1. Have fun @ http://faq.javaranch.com/java/JavaRaq
2. Looking for simple infix2postfix conversion and postfix evaluation package? Click here
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HTTP - tunneling and Objects..
 
Similar Threads
objects and references
Poping applet from a servlet
Wrapping ResultSet
http tunneling
Objects and Instance Variables Confusion...