web server is required for URL.
this web server should have to provide a service on a perticuler
port
&
our client would get connected by typing a url in address
the formate would be
http:\\<<service provider name>>

ort\<<client program>>
here is some client program
//________________
import java.net.*;
import java.io.*;
import java.util.*;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class ClientApplet extends Applet implements Runnable{
private TextArea theTextArea=null;
private TextField theTextField=null;
private Thread thread=null;
private ServerConnection connection=null;
public void init(){
try{
//System.out.println(connection.getNextMessage());
theTextArea =new TextArea("Main Chat Room....",10,10,TextArea.SCROLLBARS_VERTICAL_ONLY);
theTextField=new TextField();
theTextField.setSize(100,25);
theTextField.requestFocus();
theTextArea.setEditable(false);
this.setLayout(new BorderLayout(2,3));
this.add(theTextField,BorderLayout.SOUTH);
this.add(theTextArea,BorderLayout.NORTH);
this.setVisible(true);
connection=new ServerConnection("192.168.0.249",6006);
theTextField.addKeyListener(new KeyListener(){
public void keyPressed(java.awt.event.KeyEvent A) {
if (A.getKeyCode()==A.VK_ENTER) {
if (!theTextField.getText().equals("")) {
connection.broadcastMessage(theTextField.getText());
//theTextArea.append(connection.getNextMessage());
theTextField.setText("");
}//innet IF
}//outer IF
if (A.getKeyCode()==A.VK_0){
theTextArea.append(connection.getNextMessage());
}
}
public void keyReleased(java.awt.event.KeyEvent A) {
}
public void keyTyped(java.awt.event.KeyEvent A) {
}
});
}
catch(Exception exp){
}
}
public void start(){
//connection.getNextMessage();
// if(thread==null){
thread=new Thread(this);
thread.setPriority(Thread.MIN_PRIORITY);
thread.start();
// }
// else
// thread.start();
}
public void run() {/*
while ( thread==Thread.currentThread() ) {
String line = connection.getNextMessage();
if (!line.equals(null)) {
//line=line.substring(this.SERVER_MSG_PREFIX.length());
theTextArea.append(line+"\n");
//System.out.println(line);
}
}//END-WHILE
*/}
}