I had an EOFException problem with this same sequence and eventually found
that code in the servlet was failing or hanging and nothing was being
sent back to the applet.
> X-Sender: [EMAIL PROTECTED]
> Mime-Version: 1.0
> Date: Mon, 31 Jul 2000 01:51:25 +1000
> From: Nelson <[EMAIL PROTECTED]>
> Subject: Sending boolean values from servlet to applet
> Comments: To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
>
> Hi,
>
> I've been trying to send boolean values from a servlet back to an applet,
> but I am stuck. I am doing something like this:
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp) throws
> ServletException, java.io.IOException
> {
> // Get the input stream for reading data from the client
> DataInputStream in = new DataInputStream(req.getInputStream());
>
> // We'll be sending binary data back to the client so
> // set the content type appropriately
> resp.setContentType("application/octet-stream");
>
> // Data will always be written to a byte array buffer so
> // that we can tell the client the length of the data
> ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
>
> // Create the output stream to be used to write the
> // data to our buffer
> DataOutputStream out = new DataOutputStream(byteOut);
>
> // Send back a boolean value indicating that the
> // user is invalid
> if userIsValid(something)
> out.writeBoolean(true);
> else
> out.writeBoolean(false);
> out.close();
> }
>
> -- sometimes I get EOFException, sometimes i get true, but I never get
> false back.. the applet uses :
>
> DataInputStream in = new DataInputStream(urlConnection.getInputStream());
> boolean value = in.readBoolean();
>
> Can anyone help please?
> Nelson
>
> ___________________________________________________________________________
> 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
------------- End Forwarded Message -------------
___________________________________________________________________________
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