// Listing 3 // // Servlet server-side code to read a serialized // student object from an applet. // // The servlet code handles a POST method // public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ObjectInputStream inputFromApplet = null; Student aStudent = null; PrintWriter out = null; BufferedReader inTest = null; try { // get an input stream from the applet inputFromApplet = new ObjectInputStream(request.getInputStream()); // read the serialized student data from applet aStudent = (Student) inputFromApplet.readObject(); inputFromApplet.close(); // continue the process for registering the student object } catch(Exception e) { // handle exception } }