When a request comes in to the server for an URL we can start with checking if it's a file that exists in the webroot folder for the server. But if the file doesn't exists before sending a 404 error we can try to handle the requested url with some built in method in the server that dynamically can generate an answer.
Take inspiration from HTTPServlet class and design our own class or interface that we in the future can extend and add as a potential handler for a specifik url.
When a request comes in to the server for an URL we can start with checking if it's a file that exists in the webroot folder for the server. But if the file doesn't exists before sending a 404 error we can try to handle the requested url with some built in method in the server that dynamically can generate an answer.
Take inspiration from HTTPServlet class and design our own class or interface that we in the future can extend and add as a potential handler for a specifik url.