Andy,
A couple of things might help. In the servlet code set the content type
to "application/octet-stream" before sending the object. For example:
httpResponse.setContentType("application/octet-stream");
In the applet add the following code
InputStream in = msg.sendGetMessage(props);
/* if (in == null)
{
textAreaPanel.addText("in is null.\n");
}
if (bDebugMode) textAreaPanel.addText("sent GetMessage.\n");
con.connect(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< add this
ObjectInputStream result = new ObjectInputStream(in);
Hope this helps,
Rob Griffin
Quest Software
E-mail: [EMAIL PROTECTED]
Web site: http://www.quest.com
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Andrew Dingfelder
> Sent: Saturday, 10 June 2000 2:36
> To: [EMAIL PROTECTED]
> Subject: problem sending data from servlet to applet
>
>
> Hi everyone,
>
> I'm having trouble sending data from a servlet to an
> applet as an object.
> Can anone provide me a clue ?
>
> I can successfully send the data as a string, but would
> rather use an object.
>
> I seem to get a Null exception if I use the commented
> code in the examples below
> (I have included urls to the code, as well as a
> semi-working verion of the code)
> (I'll try & respond with the actual error message when I
> get home)
> ___________________________________________
>
> servlet code:
>
http://24.25.16.175:8080/src_ethics.html
____________________________________________
applet code
http://24.25.16.175:8080/src_viewer.html
____________________________________________
overview of what I am doing (a flowchart of the process)
http://24.25.16.175:8080/flow.gif
______________________________________________
semi working demo, the cookies don't seem to be working
right
(they are not settign the date right
& the hash is not remembering the questions right)
The DB only has 3 questions entered into it,
& one is just some numbers instead of text
http://24.25.16.175:8080/EthicsSimulation.html
______________________________________________
Thanks for any tips anyone can give me to get the object
working...
Andy D
Andrew Dingfelder
Computing As You Like It
108 Blanchard St., Raleigh NC 27603
[EMAIL PROTECTED]
Phone (919) 828-9824
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html