publicstaticvoidmain(String[] args)throws IOException{// write your code here
ServerSocket ss =newServerSocket(80);
Socket s = null;while((s = ss.accept())!=null){newMyThread(s).start();}
ss.close();}
publicclassMyThreadextendsThread{private Socket socket;publicMyThread(Socket socket){this.socket = socket;}publicvoidrun(){try{
OutputStream out = socket.getOutputStream();
PrintWriter pw =newPrintWriter(out);
pw.println("<html>");
pw.println("<head>");
pw.println("</head>");
pw.println("<body>");
pw.println("this is my web server");
pw.println("</body>");
pw.println("</html>");
pw.flush();
pw.close();
socket.close();}catch(IOException e){
e.printStackTrace();}}}
public static void main(String[] args) throws IOException{ // write your code here ServerSocket ss = new ServerSocket(80); Socket s = null; while((s = ss.accept())!=null){ ...