Hy Joe,  have you checked for errors  on the communicator/tools/java/console
May be you are having some troubles with the security manager.

Bye.

Demch :)


Joe Komar wrote:

> Environment: JWS 1.1.3 on Windows 95, JDK 1.1.7
>
> Using the code below for the Applet and the Servlet, I'm able to send the Vector
> object to the servlet. It works just fine with Internet Explorer 5.0 but doesn't
> work at all with Netscape Communicator 4.6 -- no exception thrown, just plain
> doesn't make the connection and send the object.
>
> Any thoughts or ideas would be greatly appreciated!
>
> Applet code:
>
>         try {
>                 host = getDocumentBase().getHost();
>                 port = getDocumentBase().getPort();
>                 host = host + ":" + port;
>                 servletURL = new URL("http://" + host + "/servlet/Servlet2Applet");
>                 uc = servletURL.openConnection();
>                 uc.setDoOutput(true);
>                 uc.setUseCaches(false);
>                 uc.setDefaultUseCaches(false);
>                 uc.setRequestProperty("Content-Type", "application/octet-stream");
>                 objOut = new ObjectOutputStream(uc.getOutputStream());
>                 test = new Vector();
>                 for (int i = 0; i < list1.getItemCount(); i++){
>                     test.addElement(list1.getItem(i));
>                 }
>                 list1.clear();
>                 objOut.writeObject(test);
>                 objOut.flush();
>                 objOut.close();
>                 textField1.setText("Sent to Servlet");
>
>                 } catch (Exception e) {textField1.setText("exception on send");
>                 }
>
> Servlet code:
>
>           try{
>                 ObjectInputStream in = new ObjectInputStream(req.getInputStream());
>                 Vector test = (Vector)in.readObject();
>                 in.close();
>                 FileOutputStream f = new FileOutputStream("d:/cmd/misc/test.ser");
>                 ObjectOutputStream os = new ObjectOutputStream(f);
>                 os.writeObject(test);
>                 os.flush();
>                 os.close();
>            }
>            catch (Exception e){System.err.println("Exception caught");}
>
> ___________________________________________________________________________
> 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

--
**********************************************************
     Ing. Diego Malpica Chauvet 238-5083 ext 5083
       Departamento de Sistemas de Infomaci�n

                    Tec de Monterrey
1999: A�o de la Confianza en el Campus Estado de M�xico
           Premio Nacional de Calidad 1998
**********************************************************

___________________________________________________________________________
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