Hi all
I read Bear's article "Scriptless JSP Pages: The Front Man" and found it very informative. I pretty much understood what was going on, but just wanted to make sure this makes sense using to you guys. So basically in a Model 2 all requests come into the front controller and then the controller delegates out to certain command classes based on a configuration. I was a little confused as to where this config is kept? I was thinking I could do something like this. Let me know if this sounds correct?
Say I had a jsp and you could either view, update, delete, or create something. Could I just set a request parameter called method send the request to the front controller, have a switch on the method parameter, and then create whatever command class I needed to delegate out to based on the method name? For example if I passed ?method=delete id=1 then the front controller could created a DeleteCommand class do the deletion and then redirect to the view controller which would then fwd back to the jsp? Does this make sense?
Thanks,
AMD