import java.io.IOException; import java.util.Set; import java.util.Map.Entry; import javax.swing.text.html.parser.Entity; import com.sun.grizzly.http.embed.GrizzlyWebServer; public class Webserver { public static void main(String[] args) { GrizzlyWebServer ws = new GrizzlyWebServer(); ws.addGrizzlyAdapter(new MyAdapter("/home/rama/test")); try { ws.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } new Thread() { public void run() { while (true) { try { Thread.sleep(10000);//elaboration time simulator :D } catch (InterruptedException e) { e.printStackTrace(); } Set> a = Session.sessions.entrySet(); for (Entryz : a) { synchronized (z.getValue().msg) { z.getValue().msg.add(""); z.getValue().msg.notify(); } } System.out.println("ADD MSG"); } } }.start(); System.out.println("HEY"); } }