hi,....

i am trying to develop a one-to-one chat application as a part my j2ee web app (jsp and servlets used) ,... help me with this.
what els should i learn in addition to socket programming?
which architecture should i follow? how many days wil it take for an avaerage programmer ?
any other considerations? pls guide me with this, ... i didnot worked with this type of application b4. give me a start.

thanks in adv,
BeanBoy

chat over lan or internet(like skype..)

Yes, it will help show just how bad a beginner's code can be. If you enjoy schoolboy howlers like these then go ahead and feast on Vaibhav's code. if you want to score more than an "E" on your assignment then write something yourself.

public static void main(String args[])throws IOException
{ 
... (implements the whole program in this one method)
}

...

if((cm.compareTo("bye")==0)||(m.compareTo("bye")==0))
{flag=true;
}

...

wait=true;
while(wait);

...

 while(!flag)

 ...

 if(e.getActionCommand()=="send")

 ...

 catch(IOException e)   {
 System.out.println("exception occoured !");
 }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.