Hi
In my opnion it will be difficult to send in the same response stream
some data to the applet and some data directly to the browser.
It seems a bad idea to change the content-type during the anwser.
I would do this :
1)Send your object to the applet.
2)Without changing the content-type of the answer, send your html
code to the applet in a String Object.
3)When your applet has received the HTML code,send this code
to the browser => you can do this with LiveConnect API
(netscape.javascript.JSObject =>
work also with IE)
HTH
JM
-----Original Message-----
From: RAD InfoTech [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 6:44 AM
To: [EMAIL PROTECTED]
Subject: Writing HTML to client after writing an object
Can a Servlet follow a write of an object to an applet with a write of some
plain HTML to same response object?
Details:
Applet A prepares an object and sends to Servlet S.
S gets the object, does some DB updates and then writes the object back to
the Applet.
After this, we want the Servlet to write a simple HTML
to display "Update Successful. Now click OK to return to Widgets List"
So, we did this:
<after the Servlet closed the outputstream to the Applet>
resp.set-contet-type("test/html");
out = resp.getwriter(resp);
<proceed to write HTML to out>
What happens is:
After we added the above code to write HTML, the orig functionality has
stopped working,
let alone the new bit. Servlet seems to get the obj from applet, but does
not process it
or send it back. On the Java Console, we get a 'IOException' from the Applet
side.
Question: What are we doing wrong? How can we do it right?
Thanks in advance.
Rali Panchanatham
___________________________________________________________________________
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
___________________________________________________________________________
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