Just asking... are you trying to connect your applet to machine other than
the machine from where your browser downloaded the applet ? If so, then
you'r trying to violate the so called "browser sandbox"... You can always
connect an unsigned applet to host from which you'v downloaded the applet.

Slavikos

 ################################################################
   Filippos Slavik
   Part of the SIAMS's implementation development team. For more
   information, please check http://www.siams.net

   e-mail : [EMAIL PROTECTED]

 ################################################################

 "The software said 'runs on Win95 or better,' so I installed
  it on Linux..."


----- Original Message -----
From: ANUPAMA PONNAPALLI <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 04, 1999 12:54 PM
Subject: Crazy Problem !! Please Help !!!! ! Please Help !!!! Urgent !!!


> Hi,
>     I am facing a crazy problem and its driving me nuts...  I
> have developed an applet, which calls servlets to get the data
> from db2. I have tested the applet in the appletviewer,
> and it works smoothly.
>        The problems started once I started testing it in the
> browser (IE 4.0) . It still runs smoothly (in the browser), on
> my machine where the servletrunner is also running But
> when I test it on other PCs (IE 4.0 again), it throws an
> exception : InternetReadFile exception. I have not been
> able to find any explanation for it in the Java documentation.
> It throws this exception when I read the object being passed
> from the servlet. It gets the ObjectInputStream without any
> exception.  the code is as below :
>
> public Vector executeQuery(String servlet, Vector send) {
>         try
>         {
>             URL ptl = new URL(url + servlet);
>             URLConnection c = ptl.openConnection();
>
>             c.setDoOutput(true);
>             c.setDoInput(true);
>
>             ObjectOutputStream out = new
> ObjectOutputStream(c.getOutputStream());
>             out.writeObject(send);
>
>             ObjectInputStream in = new
> ObjectInputStream(c.getInputStream());
>             rv = (Vector) in.readObject();  // exception here
>
>             in.close();
>             out.close();
>         }catch (Exception e) {
>             System.out.println("Exception: " + e);
>         }
>
>         if (rv == null) {
>             JOptionPane.showMessageDialog(null, "Error in
> Mainframe access");
>             System.out.println("error : rv is null");
>             error = true;
>             return null;
>         }
>     }
>
>      In the servlet, I print the vector contents just before
> writeObject(reply), the data is properly displayed. here is the
> servlet code :
>
>         try {
>             ObjectInputStream in = new
> ObjectInputStream(req.getInputStream());
>             input =  (Vector) in.readObject();
>             in.close();
>         }catch (Exception e) {
>             System.out.println("exception " + e);
>         }
>
>     // database access operations
>
>           try {
>             ObjectOutputStream out = new
> ObjectOutputStream(res.getOutputStream());
>           System.out.println("reply = " + reply); // data seen
> correctly
>             out.writeObject(reply);
>             out.close();
>         }catch (Exception e) {
>             System.out.println("exception " + e);
>         }
>     }
>        This behavior is unpredictable. Sometimes, the first call
> to the servlet goes off smoothly, it gives problems second or
> third call onwards. Its just driving us crazy...  Please help us
> out with this problem.. any suggestions are welcome...
>   Thanking you, in anticipation,
>
> Anupama
>
>
___________________________________________________________________________
> 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

Reply via email to