I am playing around with a web application that will provide database interaction for various types of users. Some funcionality will be shared by all users (such as creating and updating personal account files), but other functionalities will be specific to the particular user types. I'd like to have some sort of centralized controller servlet take all requests and respond accordingly.
My question is in regard to design. Is it a good idea to have multiple controller servlets, one for each type of user? If so, would it be good to have another servlet simply take all requests and forward each request to the appropriate usertype-specific controller servlet (thus creating some sort of trickle down task distribution)?
I'm new to java web technologies, and so it would be helpful to know if my general idea of using controller servlets itself is appropriate.
thanks
jdubowy
ps. How can I configure the server to initialize the central controller servlet once the user tries to log in, so that the servlet persists only as long as the user uses the application (which, in case of failed authentication, may be only as long as it takes to send the user back to the login page)? And once the user is authenticated, how can I make the various jsp pages forward requests to be process by the central servlet.
My question is in regard to design. Is it a good idea to have multiple controller servlets, one for each type of user? If so, would it be good to have another servlet simply take all requests and forward each request to the appropriate usertype-specific controller servlet (thus creating some sort of trickle down task distribution)?
I'm new to java web technologies, and so it would be helpful to know if my general idea of using controller servlets itself is appropriate.
thanks
jdubowy
ps. How can I configure the server to initialize the central controller servlet once the user tries to log in, so that the servlet persists only as long as the user uses the application (which, in case of failed authentication, may be only as long as it takes to send the user back to the login page)? And once the user is authenticated, how can I make the various jsp pages forward requests to be process by the central servlet.