This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes HELP! Whats wrong with this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HELP! Whats wrong with this?" Watch "HELP! Whats wrong with this?" New topic
Author

HELP! Whats wrong with this?

Dave Donohoe
Ranch Hand

Joined: May 16, 2000
Posts: 73
The following code calls an applet & sends a hashtable to the applet.
This will not work - it seems as if the applet never gets called. However, no exceptions/errors are raised!
The code works if I create hastable & only add one hash pair to it - does this mean that there is a limit on the size that can be sent to the applet?

ObjectOutputStream output = new ObjectOutputStream(m_httpResponse.getOutputStream());
output.writeObject(m_hshData);
output.writeBytes("<APPLET CODE='DavesApplet.class' ARCHIVE='DDavesApplet.jar' WIDTH=0 HEIGHT=0 CODEBASE='/BEAT/applet/'>");
output.flush();
output.close();
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
Let me get this straight - you are writing both a Hashtable object (binary) and the HTML code for an APPLET tag (text) to the response? What are you trying to do?
Bill
Dave Donohoe
Ranch Hand

Joined: May 16, 2000
Posts: 73
Thanks for your replies William,
I have solved the problem!
What I was trying to do was pass the hashtable from the Servlet to the applet.
 
Don't get me started about those stupid light bulbs.
 
subject: HELP! Whats wrong with this?
 
Similar Threads
problem in sending image from applet to servlet
Tomcat Comet Error: invalid type code: AC
Object Read problem
sending two byte arrays from servlet to applet
readObject() throwing EOFException