I am in the following situation:
Client makes some request -> Servlet gets all requests -> based on requested url (example: https://bla.com/classic) it fetches products from database -> invokes a jsp page and passes products array as parameter -> jsp page rendes HTML to client
How can this be achieved ? More specific question:
1.How to catch all client requests with a servlet and get the requested url ?
2.How to call jsp from servlet and pass parameters to it, so it can render the correct HTML ?
I am trying to build an MVC-like application. In this case my servlet is the controller (gets all requests), a database-helper-class is my model (gets products from db) and the jsp file is my view (renders html).
Thanks in advance :)