This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes between applet and servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark " between applet and servlet" Watch " between applet and servlet" New topic
Author between applet and servlet

may Lee
Ranch Hand

Joined: Nov 20, 2003
Posts: 68
I use the following code to pass an object from applet to servlet, then receive another object from servlet to applet. Got the error.
It is Signals that an end of file or end of stream has been reached unexpectedly during input. What could be the reason?

datato=new dataToservlet(year,month,day,hour,minute,timelength);
datafrom=new dataFromservlet(area,channelnum);

URL url=new URL(servletPath);
URLConnection conn=url.openConnection();
/****send object from applet to servlet******************/
ObjectOutputStream toServlet=new ObjectOutputStream(conn.getOutputStream());
/****get object df from servlet*********/
ObjectInputStream fromServlet=new ObjectInputStream(conn.getInputStream());
}catch(Exception e){appleterrormessage=e.toString();appleterror=true;}
I agree. Here's the link:
subject: between applet and servlet
It's not a secret anymore!