// Listing 5 // // Applet client-side code to read a serialized // vector of student objects from a servlet. // // // connect to the servlet URL studentDBservlet = new URL( servletLocation ); URLConnection servletConnection = studentDBservlet.openConnection(); // Don't used a cached version of URL connection. servletConnection.setUseCaches (false); servletConnection.setDefaultUseCaches(false); // Read the input from the servlet. // // The servlet will return a serialized vector containing // student entries. // inputFromServlet = new ObjectInputStream(servletConnection.getInputStream()); studentVector = (Vector) inputFromServlet.readObject();