I've finally wrapped my head around the concept of using
JSP for the view, a
servlet for the controller, and POJOs for the model. I find myself routinely falling back into this
pattern for my controller, which I totally fabricated in my head and I have no idea if it is good/bad/otherwise.
I basically define an enum in my servlet class called Action that contains values I expect to receive as a parameter. I attempt to match the request parameter stored in "action" to one of the enums. Then I enter a switch statement that switches on the enum values. Each case does whatever it needs to to the model and sets the url
string for the dispatcher. At the end of the switch statement, I forward the request using the dispatcher.
Is this how a controller should work? Are there any good resources available on controller design/patterns/etc?