Sending Serialized Objects to A Server And Displaying the contents

hi, i am trying to input a student name on a client(which is working for me) , which is then sent to a server and displayed on the server screen!! i just cant get this to work for me for some reason!

It stops at "s = (Student)istream.readObject();" on the server, could someone please help me on this one as i've pulled out nearly all my hair at this stage! ;-)

i have added the functions (minus some catch expressions) below, the server and sockets etc are all working fine! cheers.

Any tips, help would be very much appreciated!

<Server code>

private static void run()

{

try

{

link = servSock.accept();

PrintWriter out = new PrintWriter(link.getOutputStream(),true);

ObjectInputStream istream = new ObjectInputStrea(link.getInputStream());

Student s = null;

Try

{

s = (Student)istream.readObject();

System.out.println("Name=" + s.getName());

} catch (Exception e){ }

...............

}

<End of Server Code>

<Client Code>

private static void run() throws ClassNotFoundException

{

try

{

Socket link = new Socket(host,PORT);//Step 1.

BufferedReader in = new BufferedReader(new

InputStreamReader(link.getInputStream()));

ObjectOutputStream out =

new ObjectOutputStream(link.getOutputStream());

BufferedReader userEntry = new

BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter Name");

name = userEntry.readLine();

...................

<end of client code>

[1625 byte] By [ronan001a] at [2007-10-2 5:10:35]
# 1
I don't see the code where you actually send the Student object to the server.Regards,Adrian.
beradriana at 2007-7-16 1:13:28 > top of Java-index,Core,Core APIs...
# 2
Does Student implement the Serializable interface?
swatdbaa at 2007-7-16 1:13:28 > top of Java-index,Core,Core APIs...