Assignment 5:

Client-Server Applications Using Java

    The goals of this laboratory session are the following.
     
  1.  finger.java  is a Java finger client.

  2. Expn.java  uses SMTP Protocol to do address expansion (try java Expn postmaster@ketu -v , for example). Install and try them out.

    The above take argument(s) from the command line. Modify one/both to prompt the user for input( maybe in a loop for more than one session) and do their work.


  3. Compile and try  HttpClient.java

  4. Sample commands to try.
    java HttpClient chandra.cse.iitb.ac.in 80 /
    java HttpClient www.iitb.ac.in 80 /dummy
    java HttpClient www.cse.iitb.ac.in 80 /
    java HttpClient everest 80 /~cs296/

  5. Install and run  EchoServer

    (The above file is a shar file. Download it and execute $sh EchoServer.shar. This will generate three files : EchoServer.java, NetworkServer.java, SocketUtil.java)

    See EchoServer.java. Use port number 7xyz where xyz are the last 3 digits of your roll number.
    Compile and run EchoServer.java. Connect to your server with various clients(telnet ketu 7xyz , lynx , HttpClient) and check.


  6. New Assignment - write a Joke Server and Client. Allow the user to choose a joke and return a random one of that type.