- servlet, that returns an image: response.setContentType("image/jpeg"); BufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D gr = result.createGraphics(); gr.setBackground(Color.white); gr.fillRect(0, 0, width, height); gr.setColor(Color.BLACK); gr.drawLine(x1, y1, x2, y2); OutputStream out = response.getOutputStream(); ImageIO.write(result, "jpg", out); - asynchronous servlet: - read about asynchronous servlets at the end of: https://dai.fmph.uniba.sk/courses/java2/jsp/jsp/kap3.pdf - also check asyncronous section and nonblocking I/O subchapter here: http://dai.fmph.uniba.sk/courses/java2/glassfish/j7.pdf - create simple async servlet for assigning "first" "second" to two users on the same URL - see video link: https://dai.fmph.uniba.sk/courses/java2/first_and_second.zip - download servlet from LIST homework, and study that, version for IDEA and Jakarta9 available here: https://dai.fmph.uniba.sk/courses/java2/AsyncChat.zip - implement new async servlet for single-line chat for two users as required in LIST hw