A web application needs to redirect the user to different pages based on their role. How should this logic be implemented using servlets in MVC?
- In the Controller
- In the Model
- In the View
- Using servlet filters
The logic for redirecting users based on their role should be implemented in the Controller. The Controller handles the application's flow and decides which view to render based on the user's role.
Loading...
Related Quiz
- Which XML element is used to declare a filter in a web application's deployment descriptor?
- _________ scaling involves adding more resources to the existing servers.
- Which of these is not a type of memory area in the Java Virtual Machine (JVM)?
- A filter is implemented to log request details. Where should this logging take place in the filter's methods?
- What is the difference between context and init parameters in servlet configuration?