Hello,
Does the working of servlets have any connection with the version of
Java.
Its working with JDK1.1.8 and not JDK1.3


Scenario
1.Applet in client
2.Servlets in Java Web Server

Error
----------------------------------------------------------------------------------------------------------------
Class:ONE(PWG_DatabaseProxy)
----------------------------------------------------------------------------------------------------------
import java.io.*;
import java.net.*;
import java.util.*;

public class PWG_DatabaseProxy
{
  URL servletadd;  // The fully-qualified URL to the called servlet.
  URL webBase;  // The complete URL to the servlet web server (ex.
'http://www.sun.com:8080').
  ObjectInputStream in; // Input stream from the servlet.
  ObjectOutputStream out; // Input stream from the servlet.


  public PWG_DatabaseProxy(URL web)
  {
   webBase = web;
  }

    public Serializable[] exchangeDataWithServlet(String
strServletName,Serializable objs[])throws Exception
    {
       String def = "http://192.168.0.97:8080/servlet/PWS_Submodule"
;>>>>>>>>(Different address coming in Stack Trace)
        servletadd = new URL(def);
        in = PWG_ServletWriter.postObjects(servletadd,objs);
        Serializable[] data = (Serializable [])in.readObject();
        System.out.println("Data======"+data);
        in.close();
        return data;
    }
}
-----------------------------------------------
CLASS:TWO(PWG_ServletWriter invoked by CLASS ONE)
--------------------------------------------------------------------------------------------

import java.net.*;
import java.io.*;
public class PWG_ServletWriter
{
  static public ObjectInputStream postObjects(URL ser,Serializable
objs[]) throws Exception
  {

   URLConnection con = ser.openConnection();
   con.setDoInput(true);
   con.setDoOutput(true);
   con.setUseCaches(false);
   con.setRequestProperty("Application","octet-stream"+objs.getClass
().getName());
   ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream
());
    out.writeObject(objs);
    out.flush();---------------------------->>>>>>>>>>>>>>>Error
causing ststement please refer below
   out.close();
   return new ObjectInputStream( con.getInputStream() );
  }
}
-----------------------------------------------------
SYSTEM RESPONSE
-----------------------------------------------------

Exception is =========>java.io.FileNotFoundException: 
192.168.0.97:8080//servlet/PWS_Submodule
java.io.FileNotFoundException: 192.168.0.97:8080//servlet/PWS_Submodule
     at com/ms/net/wininet/http/HttpInputStream.connect (HttpInputStream.java)
     at com/ms/net/wininet/http/HttpInputStream.<init> (HttpInputStream.java)
     at com/ms/net/wininet/http/HttpURLConnection.createInputStream 
(HttpURLConnection.java)
     at com/ms/net/wininet/WininetURLConnection.getInputStream 
(WininetURLConnection.java)
     at com/ms/net/wininet/http/HttpPostBufferStream.close (HttpPostBufferStream.java)
     at java/io/ObjectOutputStream.close (ObjectOutputStream.java)
     at PWG_ServletWriter.postObjects (PWG_ServletWriter.java:37)
     at PWG_DatabaseProxy.exchangeDataWithServlet (PWG_DatabaseProxy.java:25)
     at PWA_SubModule_Mnt.init (PWA_SubModule_Mnt.java:155)
     at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
     at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
     at com/ms/applet/AppletPanel.run (AppletPanel.java)
     at java/lang/Thread.run (Thread.java)


at ststement----------------------->>>>>>>>>>>>>>>>with this symbol above




thanks
Donny.

___________________________________________________________________________
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