Okay the applet side does this <snipped>

      URL url = new URL("http://localhost:8080/bob/servlet/bob";);
      HttpURLConnection urlCon = (HttpURLConnection)url.openConnection();
      urlCon.setDoOutput(true);
      urlCon.setRequestMethod("POST");

urlCon.setRequestProperty("Content-Type","application/x-java-serialized-object")
;
      oos = new ObjectOutputStream(urlCon.getOutputStream());
      oos.writeObject(submission);
      oos.flush();
      oos.close();

and the servlet does this.

 public void doPost(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException {
  ObjectInputStream ois = null;
  Object obj = null;

  try {
   ois = new ObjectInputStream(req.getInputStream());
   obj = ois.readObject();
  }
  catch(Exception ex) {log("Obj Input Stream Error "+ex);}
  finally{ois.close();}

  res.setContentType("text/plain");
  PrintWriter out = res.getWriter();
  log("OUTPUT from servlet "+obj.toString());
 }

mike

___________________________________________________________________________
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