Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Multiple controllers or a single?

795672Aug 13 2008 — edited Aug 13 2008
Hi, still fairly new to using any sort of MVC structure with servlet and jsp.

I have been reading a book and some code a colleague has and it suggests creating an action interface and concrete implementations and passing in the name of any jsp you wish to invoke to the controller which does some reflection based work and loads appropriate classes for populating, the controller handles requests for all jsps in this example and instantiates any beans needed.

Is this the current view on things? As the book is dated 2004 and this seems like quite a complicated procedure, although I guess it does leave the controller very loosely coupled to any classes or jsp.

In my opinion it would be easier and simpler to have lots of controllers that each server a certain purpose, although this would probably mean lots more classes. Any hints or opinions would be good.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2008
Added on Aug 13 2008
10 comments
391 views