public static void main(String[] args) throws Exception {
HttpParams params = new DefaultHttpParams();
IOEventDispatch ioEventDispatch = new DefaultIoEventDispatch();
ListeningIOReactor ioReactor = new DefaultListeningIOReactor(2, params);
ioReactor.listen(new InetSocketAddress(8080));
try {
ioReactor.execute(ioEventDispatch);
} catch (InterruptedIOException ex) {
System.err.println("Interrupted");
} catch (IOException e) {